desk package
Subpackages
- desk.fitting package
- desk.outputs package
- desk.probabilities package
- desk.set_up package
- Submodules
- desk.set_up.config module
- desk.set_up.create_output_files module
- desk.set_up.error_messages module
- desk.set_up.full_grid module
- desk.set_up.get_data module
- desk.set_up.get_inputs module
- desk.set_up.get_models module
- desk.set_up.scale_dusty module
- desk.set_up.scale_external module
- Module contents
Submodules
desk.console_commands module
- desk.console_commands.fit(source: str = '/home/docs/checkouts/readthedocs.org/user_builds/dusty-evolved-star-kit/checkouts/stable/desk/put_target_data_here', distance: float = 50, grid: str = 'silicates', n: int = 50, min_wavelength: float = 0.01, max_wavelength: float = 1000, multiprocessing: int = 1, save_model_spectrum: bool = True, testing: bool = False)[source]
Fits the seds of sources with specified grid.
- Parameters:
source (str) – Name of target in array of strings (or one string).
distance (float) – Distance to source(s) in kiloparsecs.
grid (str) – Name of model grid.
n (str or int) – Number of times to scale the grid between the lum_min and lum_max specified in the config.py script (essentially grid density).
min_wavelength (float) – Minimum wavelength to fit, the other data will still be shown in the output SED.
max_wavelength (float) – Maximum wavelength to be fit.
multiprocessing (bool or int) – Uses all but one core if True, only one core if False, or uses the number of cores specified as an integer.
save_model_spectrum – Whether to save the model sprcetum as csv file.
testing (bool) – Flag for testing that uses only the first 3 rows of the mode grids.
- desk.console_commands.save_model(grid_name: str, requested_grid_number: int, requested_grid_index: int, luminosity: int, distance_in_kpc: float, custom_output_name: str = '')[source]
A function for returning a dusty grid model wavelength and flux with the grid_index, and grid_number, the luminosity, and the distance. File is output as csv in the current directory. Can add custom name in front of output, for if the model is generated with an associated target (i.e.) via the dusty_fit function with the save_model flag set to true.
- Parameters:
grid_name (str) – Name of grid used.
requested_grid_number (int) – Description of parameter requested_grid_number.
requested_grid_index (int) – Description of parameter requested_grid_index.
luminosity (int) – luminosity of model (in solar luminosities)
distance_in_kpc (float) – Distance in kpc.
custom_output_name (str) – Custom name for output in save_model_spectrum.
- Returns:
type – File with desired model wavelengtn and flux, scaled by user-set distance and luminosity.
- Return type:
csv file
- desk.console_commands.sed(source_path: str = '.', source_filename: str = 'fitting_results.csv', dest_path: str = '.', save_name: str = 'output_sed.png', flux: str = 'Wm2')[source]
Creates single SED figure of all fit SEDs using the ‘fitting_results.csv’ file.
- Parameters:
source_path (str) – Path to source.
source_filename (str) – fit results filename.
dest_path (str) – Path to save figure.
save_name (str) – Figure filename to be saved.
flux (str) – flux type (Wm2 or Jy)
- Returns:
SED figure with data in blue and model in black.
- Return type:
png
- desk.console_commands.sed_indiv(source_path: str = '.', source_filename: str = 'fitting_results.csv', dest_path: str = '.', flux: str = 'Wm2')[source]
Creates individual SED figures for all fit SEDs using the ‘fitting_results.csv’ file.
- Parameters:
source_path (str) – Path to source.
source_filename (str) – fit results filename.
dest_path (str) – Path to save figure.
save_name (str) – Figure filename to be saved.
flux (str) – flux type (Wm2 or Jy)
- Returns:
SED figure with data in blue and model in black.
- Return type:
png