|
22 | 22 | _PRODUCTION_CSV_FILENAME = 'project_red_2026_production_data.csv' |
23 | 23 | _MODEL_CSV_FILENAME = 'project_red_2026_model_data.csv' |
24 | 24 | _STEADY_STATE_CSV_FILENAME = 'project_red_2026_variance_analysis.csv' |
25 | | -_REGENERATED_GRAPH_FILENAME = 'fervo_project_red-2026_production-temperature-data-vs-modeling.png' |
| 25 | +_GENERATED_GRAPH_FILENAME_STEM = 'fervo_project_red-2026_production-temperature-data-vs-modeling' |
26 | 26 |
|
27 | 27 | _STEADY_STATE_START_YEARS = 0.041625 |
28 | 28 |
|
@@ -235,7 +235,7 @@ def _generate_production_temperature_comparison_graph( |
235 | 235 | production_csv_path: Path, |
236 | 236 | model_csv_path: Path, |
237 | 237 | steady_state_csv_path: Path, |
238 | | - output_path: Path, |
| 238 | + output_path_stem: Path, |
239 | 239 | steady_state_start_years: float = _STEADY_STATE_START_YEARS, |
240 | 240 | geophires_data: pd.Series | None = None, |
241 | 241 | ) -> None: |
@@ -323,18 +323,21 @@ def _generate_production_temperature_comparison_graph( |
323 | 323 |
|
324 | 324 | ax.set_xlim(0.0, 2.0) |
325 | 325 |
|
| 326 | + ax.grid(True, linestyle='--', alpha=0.5) |
| 327 | + |
| 328 | + ax.legend(loc='upper center', bbox_to_anchor=(0.5, -0.12), ncol=1, frameon=False, fontsize=11) |
| 329 | + |
| 330 | + output_path_stem.parent.mkdir(parents=True, exist_ok=True) |
| 331 | + |
| 332 | + ax.set_ylim(0.0, 200.0) |
| 333 | + fig.savefig(f'{output_path_stem}-1.png', dpi=150, bbox_inches='tight') |
| 334 | + |
326 | 335 | ax.set_ylim( |
327 | | - # 0.0, 200.0 # TODO generate zoomed out version as well |
328 | 336 | 175, |
329 | 337 | 185, |
330 | 338 | ) |
| 339 | + fig.savefig(f'{output_path_stem}-2.png', dpi=150, bbox_inches='tight') |
331 | 340 |
|
332 | | - ax.grid(True, linestyle='--', alpha=0.5) |
333 | | - |
334 | | - ax.legend(loc='upper center', bbox_to_anchor=(0.5, -0.12), ncol=1, frameon=False, fontsize=11) |
335 | | - |
336 | | - output_path.parent.mkdir(parents=True, exist_ok=True) |
337 | | - fig.savefig(output_path, dpi=150, bbox_inches='tight') |
338 | 341 | plt.close(fig) |
339 | 342 |
|
340 | 343 |
|
@@ -380,7 +383,7 @@ def generate_fervo_project_red_2026_docs(): |
380 | 383 | production_csv_path_ = _BUILD_DIR / _PRODUCTION_CSV_FILENAME |
381 | 384 | model_csv_path_ = _BUILD_DIR / _MODEL_CSV_FILENAME |
382 | 385 | steady_state_csv_path = _BUILD_DIR / _STEADY_STATE_CSV_FILENAME |
383 | | - regenerated_graph_path = _get_file_path(f'../../docs/_images/{_REGENERATED_GRAPH_FILENAME}') |
| 386 | + generated_graph_path_stem = _get_file_path(f'../../docs/_images/{_GENERATED_GRAPH_FILENAME_STEM}') |
384 | 387 |
|
385 | 388 | _log.info('Extracting data from image...') |
386 | 389 | df_actual, df_model_ = extract_plot_data(IMAGE_PATH, PRODUCTION_IMAGE_PATH) |
@@ -412,10 +415,10 @@ def generate_fervo_project_red_2026_docs(): |
412 | 415 | production_csv_path_, |
413 | 416 | model_csv_path_, |
414 | 417 | steady_state_csv_path, |
415 | | - regenerated_graph_path, |
| 418 | + generated_graph_path_stem, |
416 | 419 | geophires_data=get_project_red_production_temperature_profile_series(df_model_), |
417 | 420 | ) |
418 | | - _log.info(f'Wrote regenerated graph: {regenerated_graph_path}') |
| 421 | + _log.info(f'Wrote regenerated graph: {generated_graph_path_stem}') |
419 | 422 |
|
420 | 423 |
|
421 | 424 | if __name__ == '__main__': |
|
0 commit comments