Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructure/separate transport state (#2492)
* restructure of geometry * add radial1d boundary logic * black format * several fixes * fix epsilon * add testing of boundaries * change the r_inner_active * first integration with `from_config` working * hunting down density indexing bug * all model tests (without csvy) pass * more fixes * fix of model to simulation_state * fix inner boundary packet error * fix some leftovers * final fix for csvy * blackify * restructure to readers and remove some leftover code * further cleanup * first start of the restructure * add comment about removing quantitiness * add velocity check * add new abundance functions * remove default units * add new matter module * several restructures. move decay from io to tardis/model/matter * mid restructure * slow progress on abundance refactor * include effective_element_masses * further updates * fix of csvy readers * last fixes to custom abundance widget * restructuring the radiation field * some cleanup * cleanup * further cleanup * clearnup * changes * remove matter base.py * removing matter * fixed last tests * first commit for regression_data * add several parsers * add composition * remove isotopemassfractions * some small fixes * fixed w, t_rad to dilution_factor, t_radiative * add setters for w, t_rad * several fixes for instantiating the right t_rads. also ensuring that they are positive and len(t_rad) == dilution factor * add the from_config atom_data * fixing model.ipynb * fix some more tests * start of montecarlo restructure * large scale changes * further disentangling state and solver * fix tests * fix some of the issues wdigets * assert mass fractions positive. Change IsotopeAbundances to Massfractions * update estimators * add packet collection * move spectrum to mct_state * add radiation_field_state * Refactor packet initialization in MontecarloTransportSolver * Update model_nparray_attrs in test_base.py and fix output_energy in base.py * Fix temperature assertion in test_initial_temperature() and update variable names in test_montecarlo_main_loop() * Fix Integrator * Fix SDEC plot for MCTState * Fix variable names in transport module * Refactor the to_hdf code. * Refactor Monte Carlo transport solver initialization and transport state * Fix isotope mass fraction typo and t_radiatve duplicate definition * Document remove functionality for effective element masses * Fix variable name in convert_to_nuclide_mass_fraction function * Refactor test names and variable names in test_base.py * restructuring montecarlo state * Refactor gamma ray simulation setup and test functions * fix gamma ray tests * Add model_isotope_time_0 property to abundances schema * Add test for montecarlo main loop with vpacket tracking * Refactor config_reader and config_validator modules * Fix model_isotope_time_0 property in model_definitions.yml * Refactor simulation module to use pathlib * remove bad comment and refactor with ruff * Fix variable name in test_simulation_state_mass() function * Fix unit conversion in calculate_cell_masses function * Fix logger debug message in CSV reader and update method names in Composition class * black formatting * Refactor code to use composition variable in test_gamma_ray_transport.py * Refactor imports in atom_web_download.py and update return statement in config_internal.py * fix for documentation not builiding * add fix for model_isotope_time_0 * fix grid test * restructure the grid * final change * add stuff * add vpacket_log * transfer over to VPacketCollection constructor * Refactor model_reader.py and shell_info.py changing w to dilution_factor * Update damping constants and variable names in doc notebook * Refactor vpacket tracking in montecarlo_radial1d function * fix w in several places in tardis * slowly fixing radiation_field changes * fixing montecarlo tests * slowly fixing vpacket_tracker * last fix * change hdf from model to simulation_state * fixing model->simulation-state * Fix model_reader.py imports and formatting issues * Refactor variable names for clarity and consistency and being correct * Update variable names in model.ipynb * Update variable name for average temperature calculation * Fix file paths in test_grid.py, test_base.py, test_density.py, and test_base.py * Fix transport dictionary comparison * Implement regression data configurations * Refactor snapshot fixtures and add regression data handling * Update to new testing framework * Refactor imports and fixtures in conftest.py and test_nlte_solver.py * Make regression-data optional * Fix regression data synchronization in plasma tests * Refactor variable names in model reader and simulation base * Refactor store_model_to_hdf to store_simulation_state_to_hdf * Refactor HDF file handling and model reader imports * add docstr * Remove syrupy_extensions.py * Refactor code and remove unused imports and deleted file * Fix test_base and test_simulation * setting up regression with github actions * Update LFS cache IDs for refdata and regression data * Fix test_montecarlo_radial1d function * Update sync_hdf_store method in RegressionData class * Refactor test_base.py for improved accuracy and precision * update docstrings * Refactor transport state access in test_base.py * Fix warnings and add HDF output in sdec_plot.ipynb and cleanup regression_data.py * Update demo.hdf file Delete demo.hdf file Update file paths in code * Fix negative values in last_interaction_types * Update URL for atomic data repository * Refactor code for improved readability and maintainability * Refactor code to remove unnecessary array conversion * Refactor code to remove unnecessary conversion to numpy array in test_hdf_scalars * Refactor vpacket tracking in montecarlo_main_loop * Update packet_collection and vpacket_tracker * fixup of code * Add packet functionality to VPacketCollection * ruffify test_sdec_plot * Remove unused import in parse_input.py * Update VPACKET_TAU_RUSSIAN constant * Refactor montecarlo_main_loop and FormalIntegrator classes * Fixes most tests * Removes old montecarlo_state file added in merge * Fixes docs build * Fix virtual packet tracking for main loop * Restructure vpacket log storage Now located in the MCTState. Tests are still failing! * Remove some data from testing Spectra and scalars need a different testing method, out of scope for this PR. * Applied black formatting --------- Co-authored-by: Andrew Fullard <[email protected]>
- Loading branch information