Skip to content

Commit

Permalink
Added the thermal pressure model section to the init of the models se…
Browse files Browse the repository at this point in the history
…ction - indirectly for issue #1272
  • Loading branch information
DavidT3 committed Nov 22, 2024
1 parent 375d04e commit 5a85b7d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions xga/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This code is a part of X-ray: Generate and Analyse (XGA), a module designed for the XMM Cluster Survey (XCS).
# Last modified by David J Turner (turne540@msu.edu) 20/11/2024, 12:00. Copyright (c) The Contributors
# Last modified by David J Turner (turne540@msu.edu) 22/11/2024, 14:27. Copyright (c) The Contributors

import inspect
from types import FunctionType
Expand All @@ -10,19 +10,22 @@
from .entropy import *
from .mass import *
from .misc import *
from .pressure import *
from .sb import *
from .temperature import *

# This dictionary is meant to provide pretty versions of model/function names to go in plots
# This method of merging dictionaries only works in Python 3.5+, but that should be fine
MODEL_PUBLICATION_NAMES = {**DENS_MODELS_PUB_NAMES, **MISC_MODELS_PUB_NAMES, **SB_MODELS_PUB_NAMES,
**TEMP_MODELS_PUB_NAMES, **ENTROPY_MODELS_PUB_NAMES, **MASS_MODELS_PUB_NAMES}
**TEMP_MODELS_PUB_NAMES, **ENTROPY_MODELS_PUB_NAMES, **MASS_MODELS_PUB_NAMES,
**PRESSURE_MODELS_PUB_NAMES}
MODEL_PUBLICATION_PAR_NAMES = {**DENS_MODELS_PAR_NAMES, **MISC_MODELS_PAR_NAMES, **SB_MODELS_PAR_NAMES,
**TEMP_MODELS_PAR_NAMES, **ENTROPY_MODELS_PAR_NAMES, **MASS_MODELS_PAR_NAMES}
**TEMP_MODELS_PAR_NAMES, **ENTROPY_MODELS_PAR_NAMES, **MASS_MODELS_PAR_NAMES,
**PRESSURE_MODELS_PAR_NAMES}
# These dictionaries tell the profile fitting function what models, start pars, and priors are allowed
PROF_TYPE_MODELS = {"brightness": SB_MODELS, "gas_density": DENS_MODELS, "gas_temperature": TEMP_MODELS,
'1d_proj_temperature': TEMP_MODELS, 'specific_entropy': ENTROPY_MODELS,
'hydrostatic_mass': MASS_MODELS}
'hydrostatic_mass': MASS_MODELS, 'thermal_pressure': PRESSURE_MODELS}


def convert_to_odr_compatible(model_func: FunctionType, new_par_name: str = 'β', new_data_name: str = 'x_values') \
Expand Down

0 comments on commit 5a85b7d

Please sign in to comment.