AstroSpec - EranOfek/AstroPack GitHub Wiki
Description
Class Hierarchy: Base -> Component -> AstroSpec
AstroSpec is a container for source spectra and relevant auxiliary data, as well as of basic functions for spectral data manipulation.
Properties
- Data -- main data table
- MaskData -- MaskImage object
- Z -- spectrum redshift-frame [0 - restframe]
- Vel -- velocity (overrides Z)
- DistZ -- redshift for ditsnace
- LumDist
- Ebv -- color excess
- Zext -- redshift of extinction
- R -- extinction ratio (R_V)
Dependent Properties
These dependent properties allow for accessing the spectral data directly.
- Wave
- Flux
- FluxErr
- Back
- Cont
- Mask
- WaveUnits
- FluxUnits
Constructor
Setters and getters
Methods
Static methods
- blackBody - Create an AstroSpec object with black body spectra
- synspecGAIA - Load GAIA synthetic spectra and if necessary interpolate over temperature (other parameters are not interpolated)
- specGalQSO - Get galaxy/qso template spectrum from ../spec/SpecGalQSO/ data directory
- specStarsPickles - Load Pickles stellar spectra into an AstroSpec object
- specPhoenix - Get a Phoenix model stellar spectrum from a prepared grid of model data
- specHSTStarlib23 - Get Starlib spectra from ../spec/Starlib23/ data directory
- specCALSPEC - Get STSCI CALSPEC template spectrum from ../spec/CALSPEC/ data directory
Examples
% get a 2-element array of AstroSpec containing black body spectra for each of the 2 temperatures spanning the given wavelength range:
BB = AstroSpec.blackBody((4000:10:9000)', [5000; 6000])
% get an AstroSpec object containing the template spectrum of a G2V star from the Pickles' library
Spec = AstroSpec.specStarsPickles('G2','V')
% Get an AstroSpec object containing a Phoenix model stellar spectrum from a prepared grid at high or low resolution:
Sp1=AstroSpec.specPhoenix('T',5770,'logg',4.44,'Res','high');
Sp2=AstroSpec.specPhoenix('T',2240,'logg',3.5);
% get a list of all the spectra available in the CALSPEC library:
AstroSpec.specCALSPEC
% get a list of all the spectra available in the Starlib library:
AstroSpec.specHSTStarlib23
% create an AstroSpec object containing the spectrum of the HD 216640 star:
S = AstroSpec.specHSTStarlib23('HD216640');
% create a table containing the spectrum of the HD 216640 star:
Tab = AstroSpec.specHSTStarlib23('HD216640','table');