desk.outputs package
Submodules
desk.outputs.interpolate_dusty module
- desk.outputs.interpolate_dusty.check_input_range(grid_name: str, unique_teff: ndarray, unique_tinner: ndarray, unique_tau: ndarray, teff_new: float, tinner_new: float, tau_new: float)[source]
Checks if the user-inputted model values are within the range of the model grid. This is critical for the interpolation.
- Parameters:
gridname (str) – Name of model grid.
unique_teff (array) – Unique effective temperatures within the model grid.
unique_tinner (array) – Unique inner dust temperatures within the model grid.
unique_tau (array) – Unique effective temperatures within the modelgrid.
teff_new (float) – User-defined effective temperature.
tinner_new (float) – User-defined inner dust temperature.
tau_new (float) – User-defined optical depth at 10 microns.
- Returns:
Raises exception if outside of the model ranges of effective temperature, inner dust temperature or optical depth at 10 microns.
- Return type:
Error
- desk.outputs.interpolate_dusty.interpolate(grid_name: str, luminosity: float, teff_new: float, tinner_new: float, tau_new: float, distance_in_kpc: float, custom_output_name: str, print_outputs: bool)[source]
A script for returning a model within any grid or returning an interpolated model that fits within the given parameter space. The interpolation interpolates over the flux at each wavelength in the model grid.
- Parameters:
grid_name (str) – Name of grid used.
luminosity (float) – luminosity of model (in solar luminosities)
teff_new (float) – Effective temperature of desired grid.
tinner_new (float) – Inner dust temperature of desired grid.
tau_new (float) – optical depth specified at 10 microns.
distance_in_kpc (float) – Distance in kpc.
custom_output_name (str) – Custom name for output in save_model_spectrum.
print_outputs (bool) – Whether to print output expansion velocities and mass loss rates.
- Returns:
type – File with desired model. Model parameters are printed.
- Return type:
csv file
desk.outputs.parameter_ranges module
desk.outputs.plot_pdf module
- desk.outputs.plot_pdf.plot(par, pdf, bin_total_prob, best)[source]
Creates png with probability distribution of given parameter.
- Parameters:
par (str) – paramter name
pdf (class) – probability distribtion function from create_pdf.
bin_total_prob (1D array) – Description of parameter bin_total_prob.
best (float) – best value
- Returns:
probability plot.
- Return type:
creates png
desk.outputs.plotting_seds module
- desk.outputs.plotting_seds.create_fig(source_path, source_filename, dest_path, save_name, flux)[source]
Creates single SED figure of all fit SEDs using the source_filename 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.outputs.plotting_seds.get_model_and_data_for_plotting(counter, target, source_path, source_filename, flux)[source]
Gets data from target.csv file and model from grid file.
- Parameters:
counter (int) – The nth item being fit, starting at 1.
target (astropy table row) – Results of fit item read from fitting_plotting_outputs.csv.
source_path (str) – Path of source
source_filename (str) – Filename of fitting results
flux (str) – flux type (Wm2 or Jy)
- Returns:
x_data (array) – log of the wavelength of the data in microns.
y_data (array) – log of the flux of the data in w*m^-2
x_model (array) – log of the wavelength of the model in microns.
y_model (array) – log of the flux of the model in w*m^-2