ModelSets: The interface to models in the Toolbox

PDRT supports a variety of PDR models to be used to fit your data. These are represented in the Python class ModelSet. The current default are the Wolfire/Kaufman 2006 models, which have both constant density and constant thermal pressure versions, for metallicities z=1 and z=3 (limited spectral lines). Models are stored as ratios of intensities as a function of radiation field \(G_0\) and hydrogen nucleus volume density \(n\) . We expect to update these soon with new physics and a wider range of lines and metallicities. Any PDR models can be used if they are stored in the correct FITS format. We are currently working with Marcus Rollig to import the Kosma-\(\tau\) models.

For example how to use ModelSets, see the notebook PDRT_Example_ModelSets.ipynb


Manage pre-computed PDR models

class pdrtpy.modelset.ModelSet(name, z)[source]

Bases: object

Class for computed PDR Model Sets. ModelSet will interface with a directory containing the model FITS files.

Parameters
  • name (str) – identifier.

  • z (float) – metallicity in solar units.

Raises

ValueError – If identifier or z not recognized/found.

Attributes
description

The description of this model

metallicity

The metallicity of this ModelSet

name

The name of this model

supported_intensities

Table of lines and continuum that are included in ratios models of this ModelSet.

supported_lines

Table of lines that are covered by this ModelSet and have models separate from the any ratio model they might be in.

supported_ratios

The emission ratios that are covered by this ModelSet

table

The table containing details of the models in this ModelSet.

version

The version of this model

z

The metallicity of this ModelSet

Methods

find_files(m[, ext])

Find the valid model ratios files in this ModelSet for a given list of measurement IDs.

find_pairs(m)

Find the valid model ratios labels in this ModelSet for a given list of measurement IDs

get_model(identifier[, unit, ext])

Get a specific model by its identifier

get_models(identifiers[, model_type, ext])

get the models from thie ModelSet that match the input list of identifiers

list()

List the names and descriptions of available models (not just this one)

model_intensities(m)

Return the model intensities in this ModelSet that match the input Measurement ID list.

model_ratios(m)

Return the model ratios that match the input Measurement ID list.

ratiocount(m)

The number of valid ratios in this ModelSet, given a list of observation (Measurement) identifiers.

property description

The description of this model

Return type

str

find_files(m, ext='fits')[source]

Find the valid model ratios files in this ModelSet for a given list of measurement IDs. See id()

Parameters
  • m (list) – list of string Measurement IDs, e.g. [“CII_158”,”OI_145”,”FIR”]

  • ext (str) – file extension. Default: “fits”

Returns

An iterator of model ratio files for the given list of Measurement IDs

Return type

iterator

find_pairs(m)[source]

Find the valid model ratios labels in this ModelSet for a given list of measurement IDs

Parameters

m (list) – list of string Measurement IDs, e.g. [“CII_158”,”OI_145”,”FIR”]

Returns

An iterator of model ratios labels for the given list of measurement IDs

Return type

iterator

get_model(identifier, unit=None, ext='fits')[source]

Get a specific model by its identifier

Parameters

identifier (str) – a Measurement ID. It can be an intensity or a ratio, e.g., “CII_158”,”CI_609/FIR”

Returns

The model matching the identifier

Return type

Measurement

Raises

KeyError if identifier not found in this ModelSet

get_models(identifiers, model_type='ratio', ext='fits')[source]

get the models from thie ModelSet that match the input list of identifiers

Parameters
  • identifiers (list) – list of string Measurement IDs, e.g., [“CII_158”,”OI_145”,”CS_21”]

  • model_type (str) – indicates which type of model is requested one of ‘ratio’ or ‘intensity’

Returns

The matching models as a list of Measurement.

Return type

list

Raises

KeyError if identifiers not found in this ModelSet

static list()[source]

List the names and descriptions of available models (not just this one)

property metallicity

The metallicity of this ModelSet

Return type

float

model_intensities(m)[source]

Return the model intensities in this ModelSet that match the input Measurement ID list. This method will return the intersection of the input list and the list of supported lines.

Parameters

m (list) – list of string Measurement IDs, e.g., [“CII_158”,”OI_145”,”CS_21”]

Returns

list of string identifiers of ratios IDs, e.g., [‘CII_158’,’OI_145’]

Return type

list

model_ratios(m)[source]

Return the model ratios that match the input Measurement ID list. You must provide at least 2 Measurements IDs

Parameters

m (list) – list of string Measurement IDs, e.g., [“CII_158”,”OI_145”,”FIR”]

Returns

list of string identifiers of ratios IDs, e.g., [‘OI_145/CII_158’, ‘OI_145+CII_158/FIR’]

Return type

list

property name

The name of this model

Return type

str

ratiocount(m)[source]

The number of valid ratios in this ModelSet, given a list of observation (Measurement) identifiers.

Parameters

m (list) – list of string Measurement IDs, e.g. [“CII_158”,”OI_145”,”FIR”]

Returns

The number of model ratios found for the given list of measurement IDs

Return type

int

property supported_intensities

Table of lines and continuum that are included in ratios models of this ModelSet.

Return type

astropy.table.Table

property supported_lines

Table of lines that are covered by this ModelSet and have models separate from the any ratio model they might be in.

Return type

astropy.table.Table

property supported_ratios

The emission ratios that are covered by this ModelSet

Return type

astropy.table.Table

property table

The table containing details of the models in this ModelSet.

Return type

astropy.table.Table

property version

The version of this model

Return type

str

property z

The metallicity of this ModelSet

Return type

float