single page | use frames     summary     class     fields     routine details     file attributes

src/

amespahdbidlsuite_fitted_spectrum__define.pro


Class to manage a fitted spectrum.

Updated versions of the NASA Ames PAH IR Spectroscopic Database and more information can be found at: www.astrochemistry.org/pahdb.

Examples

Create and destroy an AmesPAHdbIDLSuite_Fitted_Spectrum-instance:

IDL> fitted = OBJ_NEW('AmesPAHdbIDLSuite_Fitted_Spectrum') IDL> fitted->Set,data IDL> fitted->Plot IDL> OBJ_DESTORY,fitted

Author information

Author

Dr. Christiaan Boersma

Copyright

BSD licensed

History

Changes:

08-26-2025 Correct spelling and indentation in GETSIZEDISTRIBUTION. Christiaan Boersma. 11-27-2024 Medium/large PAH size cutoff set to 70 to align with Python counterpart. Christiaan Boersma. 09-19-2024 Use trapezium integration in favor of INT_TABULATED. Christiaan Boersma. 09-10-2024 Added GETAVERAGENUMBEROFCARBONATOMS. Christiaan Boersma. 12-13-2023 Align TOLARANCE AND ITERATIONS in DESCRIPTION. Christiaan Boersma. 11-22-2023 Add tolerance and iterations properties and their handling in SET, GET, and DESCRIPTION and add GETTOLERANCE and GETITERATIONs. Christiaan Boersma. 11-17-2023 Add MEDIUM size bin to GETBREAKDOWN, GETCLASSES, and PLOT. Christiaan Boersma. 10-04-2023 Allow setting the SMALL threshold in PLOT through keyword-inheritance. Christiaan Boersma. 06-02-2023 Accommodate UIDs >9999 in PLOT and use Courier font when presenting contributing UIDs. Christiaan Boersma. 11-23-2022 Add missing OPLOT keyword to PLOT signature. Christiaan Boersma. 06-14-2022 Use lazy instantiation for getters and keep track of function signatures. Christiaan Boersma. 05-03-2022 Align integration ranges with Python code in GETERROR. Christiaan Boersma 04-28-2022 Return piecewise errors in GETERROR and handle piecewise. errors in DESCRIPTION. Christiaan Boersma. 04-27-2022 Refactored plotting of residual in PLOT and corrected logic flow in SET. Christiaan Boersma. 06-23-2021 Get sorting right for GETERROR, added error from GETERROR to DESCRIPTION, and call Plot::Init. Christiaan Boersma. 04-30-2021 Added GETERROR. Christiaan Boersma. 03-31-2021 Intersect now calls Spectrum::Intersect instead of Data::Intersect. Christiaan Boersma. 02-17-2021 Overload Intersect to ensure weights are also intersected. Christiaan Boersma. 09-04-2020 Remove extra comma labels when plotting structures PLOT. Christiaan Boersma. 02-10-2020 Make sure to remove continuum when calculating norm and chi-squared. Christiaan Boersma. 01-25-2019 Now writing files as IPAC-tables. Christiaan Boersma. 01-23-2017 Handle UIDs larger than 999 in PLOT. Christiaan Boersma. 04-26-2016 Updated GETSIZEDISTRIBUTION to use Rice Rule for determining the number of bins. Christiaan Boersma. 04-11-2016 Added method GETSIZEDISTRIBUTION. Added SIZEDISTRIBUTION-keyword to PLOT. Christiaan Boersma. 03-29-2016 Fixed dot-notation for class access in DESCRIPTION. Christiaan Boersma. 07-12-2015 Added GETMETHOD and its infrastructure. Christiaan Boersma. 05-20-2015 Fixed missing Struct in SET. Christiaan Boersma. 05-03-2015 Updated formatting for DESCRIPTION. Christiaan Boersma. 04-24-2015 Refactored GETRESIDUAL and GETBREAKDOWN to use GETFIT and other small fixes. Christiaan Boersma. 02-01-2015 First version of the file. Christiaan Boersma.

Class description for AmesPAHdbIDLSuite_Fitted_Spectrum

Inheritance

All ancestor classes: AmesPAHdbIDLSuite_Spectrum AmesPAHdbIDLSuite_Plot AmesPAHdbIDLSuite_Data IDL_Object

Properties

Properties in AmesPAHdbIDLSuite_Fitted_Spectrum

Data init
FWHM init
Grid init
Iterations init
Method init
Model init
Observation init
PAHdb init
Profile init
Shift init
Tolerance init
Type init
Uids init
Units init
Version init
Weights init

Routines

Methods inherited from AmesPAHdbIDLSuite_Spectrum

Routines from amespahdbidlsuite_fitted_spectrum__define.pro

AmesPAHdbIDLSuite_Fitted_Spectrum::Description [, Str]

Output spectrum description.

AmesPAHdbIDLSuite_Fitted_Spectrum::Plot [, DistributionSize=int] [, Residual=int] [, Size=int] [, Charge=int] [, Composition=int] [, Structures=int] [, Wavelength=int] [, Stick=int] [, Fill=int] [, Legend=int] [, Color=int], Oplot=Oplot [, _EXTRA=struct]

Plot the fitted spectrum.

AmesPAHdbIDLSuite_Fitted_Spectrum::Write [, Filename]

Write the fitted spectrum to file as an IPAC-table.

AmesPAHdbIDLSuite_Fitted_Spectrum::Sort [, Weights] [, Flux=int]

Sorts the UIDs by their contribution to the fit.

result = AmesPAHdbIDLSuite_Fitted_Spectrum::Get()

Retrieves the AmesPAHdbIDLSuite_Fitted_Spectrum representation in a structure.

AmesPAHdbIDLSuite_Fitted_Spectrum::Set [, Struct] [, Type=string] [, Version=string] [, Data=struct] [, PAHdb=pointer] [, Uids=long array (1D)] [, Model=string] [, Units=AmesPAHdb_Units_S struct] [, Shift=float] [, Grid=float array] [, Profile=string] [, FWHM=float] [, Observation=AmesPAHdb_Observation_S array] [, Weights=struct array] [, Method=string] [, Tolerance=double] [, Iterations=long]

Populates the AmesPAHdbIDLSuite_Fitted_Spectrum-instance.

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetResidual()

Retrieves the residual of the fit.

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetFit()

Retrieves the total fit.

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetObservation()

Retrieves the ordinate values of the observation.

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetSizeDistribution( [NBins=int] [, Min=float] [, Max=float])

Retrieves the PAH size distribution of the fitted PAHs.

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetAverageNumberOfCarbonAtoms()

Retrieves the average number and standard deviation of carbon atoms of the fitted PAHs.

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetBreakdown( [Small=int] [, Medium=int] [, Flux=int] [, Absolute=int])

Retrieves the breakdown of the fitted PAHs.

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetClasses( [Small=int] [, Medium=int])

Retrieves the spectra of the different classes of the fitted PAHs.

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetWeights()

Retrieves the weights of the fitted PAHs

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetNorm()

Retrieves the Norm of the fit

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetChiSquared()

Retrieves the Chi-squared of the fit.

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetError()

Retrieves the error for the fit.

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetMethod()

Retrieves the method used for the fit.

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetTolerance()

Retrieves the tolerance used for the fit.

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetIterations()

Retrieves the number of iterations needed for the fit.

result = AmesPAHdbIDLSuite_Fitted_Spectrum::Init( [Struct] [, Type=string] [, Version=string] [, Data=struct] [, PAHdb=pointer] [, Uids=long array (1D)] [, Model=string] [, Units=AmesPAHdb_Units_S struct] [, Shift=float] [, Grid=float array] [, Profile=string] [, FWHM=float] [, Observation=AmesPAHdb_Observation_S array] [, Weights=struct array] [, Method=string] [, Tolerance=double] [, Iterations=long])

Create an AmesPAHdbIDLSuite_Fitted_Spectrum-instance

Routine details

top source AmesPAHdbIDLSuite_Fitted_Spectrum::Description

INFORMATIVE

AmesPAHdbIDLSuite_Fitted_Spectrum::Description [, Str]

Output spectrum description.

Parameters

Str out optional type=string array

Ouput to Str

top source AmesPAHdbIDLSuite_Fitted_Spectrum::Plot

PLOTTING

AmesPAHdbIDLSuite_Fitted_Spectrum::Plot [, DistributionSize=int] [, Residual=int] [, Size=int] [, Charge=int] [, Composition=int] [, Structures=int] [, Wavelength=int] [, Stick=int] [, Fill=int] [, Legend=int] [, Color=int], Oplot=Oplot [, _EXTRA=struct]

Plot the fitted spectrum.

Keywords

DistributionSize in optional type=int

Toggle to plot the PAH size distribution

Residual in optional type=int

Toggle to plot the residuals of the fit

Size in optional type=int

Toggle to plot the size breakdown of the fit

Charge in optional type=int

Toggle to plot the charge breakdown of the fit

Composition in optional type=int

Toggle to plot the compositional breakdown of the fit

Structures in optional type=int

Toggle to plot the chemical structures of the PAHs contributing to the fit

Wavelength in optional type=int

Whether to set the abscissa units to wavelength

Stick in optional type=int

Whether to plot the spectrum as sticks

Fill in optional type=int

Whether to solid-fill the spectrum

Legend in optional type=int

Whether to show a legend

Color in optional type=int

Color to plot the spectrum with

Oplot
_EXTRA in optional type=struct

Required for IDL's keyword-inheritance mechanism

top source AmesPAHdbIDLSuite_Fitted_Spectrum::Write

OUTPUT

AmesPAHdbIDLSuite_Fitted_Spectrum::Write [, Filename]

Write the fitted spectrum to file as an IPAC-table.

Parameters

Filename in optional type=string

Output filename

top source AmesPAHdbIDLSuite_Fitted_Spectrum::Sort

SET/GET

AmesPAHdbIDLSuite_Fitted_Spectrum::Sort [, Weights] [, Flux=int]

Sorts the UIDs by their contribution to the fit.

Parameters

Weights out optional type=struct array

Return the sorted weights

Keywords

Flux in optional type=int

Whether to sort by flux instead of abundance.

top source AmesPAHdbIDLSuite_Fitted_Spectrum::Get

SET/GET

result = AmesPAHdbIDLSuite_Fitted_Spectrum::Get()

Retrieves the AmesPAHdbIDLSuite_Fitted_Spectrum representation in a structure.

Return value

Structure

top source AmesPAHdbIDLSuite_Fitted_Spectrum::Set

SET/GET

AmesPAHdbIDLSuite_Fitted_Spectrum::Set [, Struct] [, Type=string] [, Version=string] [, Data=struct] [, PAHdb=pointer] [, Uids=long array (1D)] [, Model=string] [, Units=AmesPAHdb_Units_S struct] [, Shift=float] [, Grid=float array] [, Profile=string] [, FWHM=float] [, Observation=AmesPAHdb_Observation_S array] [, Weights=struct array] [, Method=string] [, Tolerance=double] [, Iterations=long]

Populates the AmesPAHdbIDLSuite_Fitted_Spectrum-instance.

Parameters

Struct in optional type=struct

Data structure

Keywords

Type in optional type=string

Type of Data

Version in optional type=string

Versioning information

Data in optional type=struct

Data structure

PAHdb in optional type=pointer

Pointer to parsed database file

Uids in optional type=long array (1D)

UIDs in Data

Model in optional type=string

References

Units in optional type=AmesPAHdb_Units_S struct

Units

Shift in optional type=float

Shift

Grid in optional type=float array

Grid

Profile in optional type=string

Profile

FWHM in optional type=float

FWHM

Observation in optional type=AmesPAHdb_Observation_S array

Observation

Weights in optional type=struct array

Weights

Method in optional type=string

Method

Tolerance in optional type=double

Tolerance

Iterations in optional type=long

Number of iterations

top source AmesPAHdbIDLSuite_Fitted_Spectrum::GetResidual

SET/GET

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetResidual()

Retrieves the residual of the fit.

Return value

float array

top source AmesPAHdbIDLSuite_Fitted_Spectrum::GetFit

SET/GET

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetFit()

Retrieves the total fit.

Return value

float array

top source AmesPAHdbIDLSuite_Fitted_Spectrum::GetObservation

SET/GET

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetObservation()

Retrieves the ordinate values of the observation.

Return value

float array

top source AmesPAHdbIDLSuite_Fitted_Spectrum::GetSizeDistribution

SET/GET

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetSizeDistribution( [NBins=int] [, Min=float] [, Max=float])

Retrieves the PAH size distribution of the fitted PAHs.

Return value

Structure

Keywords

NBins in optional type=int

Set the number of bins to use, otherwise Rice's rule is used.

Min in optional type=float

Set the minimum size to consider.

Max in optional type=float

Set the maximum size to consider.

top source AmesPAHdbIDLSuite_Fitted_Spectrum::GetAverageNumberOfCarbonAtoms

SET/GET

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetAverageNumberOfCarbonAtoms()

Retrieves the average number and standard deviation of carbon atoms of the fitted PAHs.

Return value

double array

top source AmesPAHdbIDLSuite_Fitted_Spectrum::GetBreakdown

SET/GET

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetBreakdown( [Small=int] [, Medium=int] [, Flux=int] [, Absolute=int])

Retrieves the breakdown of the fitted PAHs.

Return value

Structure

Keywords

Small in optional type=int

Cut-off size for small PAHs, defaults to 50

Medium in optional type=int

Cut-off size for medium PAHs, defaults to 70

Flux in optional type=int

Whether to use the flux to determine the breakdown

Absolute in optional type=int

Whether to return the absolute breakdown, otherwise normalize

top source AmesPAHdbIDLSuite_Fitted_Spectrum::GetClasses

SET/GET

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetClasses( [Small=int] [, Medium=int])

Retrieves the spectra of the different classes of the fitted PAHs.

Return value

Structure

Keywords

Small in optional type=int

Cut-off size for small PAHs, defaults to 50

Medium in optional type=int

Cut-off size for medium PAHs defaults to 70

top source AmesPAHdbIDLSuite_Fitted_Spectrum::GetWeights

SET/GET

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetWeights()

Retrieves the weights of the fitted PAHs

Return value

Structure

top source AmesPAHdbIDLSuite_Fitted_Spectrum::GetNorm

SET/GET

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetNorm()

Retrieves the Norm of the fit

Return value

float

top source AmesPAHdbIDLSuite_Fitted_Spectrum::GetChiSquared

SET/GET

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetChiSquared()

Retrieves the Chi-squared of the fit.

Return value

float

top source AmesPAHdbIDLSuite_Fitted_Spectrum::GetError

SET/GET

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetError()

Retrieves the error for the fit.

Return value

Structure

top source AmesPAHdbIDLSuite_Fitted_Spectrum::GetMethod

SET/GET

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetMethod()

Retrieves the method used for the fit.

Return value

string

top source AmesPAHdbIDLSuite_Fitted_Spectrum::GetTolerance

SET/GET

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetTolerance()

Retrieves the tolerance used for the fit.

Return value

double

top source AmesPAHdbIDLSuite_Fitted_Spectrum::GetIterations

SET/GET

result = AmesPAHdbIDLSuite_Fitted_Spectrum::GetIterations()

Retrieves the number of iterations needed for the fit.

Return value

long

top source AmesPAHdbIDLSuite_Fitted_Spectrum::Init

CLASS

result = AmesPAHdbIDLSuite_Fitted_Spectrum::Init( [Struct] [, Type=string] [, Version=string] [, Data=struct] [, PAHdb=pointer] [, Uids=long array (1D)] [, Model=string] [, Units=AmesPAHdb_Units_S struct] [, Shift=float] [, Grid=float array] [, Profile=string] [, FWHM=float] [, Observation=AmesPAHdb_Observation_S array] [, Weights=struct array] [, Method=string] [, Tolerance=double] [, Iterations=long])

Create an AmesPAHdbIDLSuite_Fitted_Spectrum-instance

Return value

AmesPAHdbIDLSuite_Fitted_Spectrum-instance

Parameters

Struct in optional type=struct

Data structure

Keywords

Type in optional type=string

Type of Data

Version in optional type=string

Versioning information

Data in optional type=struct

Data structure

PAHdb in optional type=pointer

Pointer to parsed database file

Uids in optional type=long array (1D)

UIDs in Data

Model in optional type=string

References

Units in optional type=AmesPAHdb_Units_S struct

Units

Shift in optional type=float

Shift

Grid in optional type=float array

Grid

Profile in optional type=string

Profile

FWHM in optional type=float

FWHM

Observation in optional type=AmesPAHdb_Observation_S array

Observation

Weights in optional type=struct array

Weights

Method in optional type=string

Method

Tolerance in optional type=double

Tolerance

Iterations in optional type=long

Number of iterations

File attributes

Modification date: Fri Nov 14 08:59:55 2025
Lines: 700
Docformat: rst rst