MWM Combined Models¶
Module: astra.models.mwm
The MWM (Milky Way Mapper) spectrum models unify APOGEE and BOSS spectra into a common framework. They resample all spectra onto standardized wavelength grids in the source rest frame, making them ready for scientific analysis.
MWM Mixins¶
MWMStarMixin¶
Base mixin for co-added (star-level) MWM spectrum models. Provides a path property that generates the mwmStar file path.
path (property)¶
# Returns path like:
# $MWM_ASTRA/<v_astra>/spectra/star/<sdss_id_groups>/mwmStar-<v_astra>-<sdss_id>.fits
MWMVisitMixin¶
Base mixin for visit-level MWM spectrum models. Provides a path property that generates the mwmVisit file path.
path (property)¶
# Returns path like:
# $MWM_ASTRA/<v_astra>/spectra/visit/<sdss_id_groups>/mwmVisit-<v_astra>-<sdss_id>.fits
MWMSpectrumProductStatus¶
Tracks whether MWM spectrum products have been created for a given source.
Field |
Type |
Description |
|---|---|---|
|
ForeignKeyField |
Link to the Source |
|
AutoField |
Primary key |
|
IntegerField |
Astra version |
|
BitField |
Processing status flags |
Status flags:
Flag |
Description |
|---|---|
|
Source has no SDSS ID |
|
Source is not stellar-like |
|
Exception occurred during processing |
|
mwmVisit file created successfully |
|
mwmStar file created successfully |
BossRestFrameVisitSpectrum¶
A BOSS visit spectrum that has been resampled onto a common log-lambda wavelength grid and shifted to the source rest frame. Stored in mwmVisit files. Inherits from MWMVisitMixin.
Key Fields¶
Field |
Type |
Description |
|---|---|---|
|
ForeignKeyField |
Unique spectrum identifier |
|
ForeignKeyField |
Foreign key to Source |
|
ForeignKeyField |
Link to the original |
|
BigIntegerField |
SDSS-V unique identifier |
|
TextField |
Data release |
|
TextField |
BOSS reduction pipeline version |
|
IntegerField |
Modified Julian Date |
|
IntegerField |
Field identifier |
|
BigIntegerField |
SDSS catalog identifier |
|
TextField |
Telescope used |
Spectral data (source rest frame):
Field |
Type |
Description |
|---|---|---|
|
PixelArray |
Log-lambda grid (4648 pixels, crval=3.5523, cdelt=1e-4) |
|
PixelArray |
Flux array |
|
PixelArray |
Inverse variance array |
|
PixelArray |
Per-pixel quality flags |
Quality and radial velocity:
Field |
Type |
Description |
|---|---|---|
|
FloatField |
Signal-to-noise ratio |
|
BooleanField |
Whether this visit was used in the combined spectrum |
|
FloatField |
Radial velocity from XCSAO (km/s) |
|
FloatField |
Effective temperature from XCSAO |
|
FloatField |
Surface gravity from XCSAO |
|
FloatField |
Metallicity from XCSAO |
NMF continuum model:
Field |
Type |
Description |
|---|---|---|
|
PixelArray |
NMF continuum model |
|
FloatField |
Reduced chi-squared of NMF fit |
|
BitField |
NMF continuum method flags |
Methods and Properties¶
path (property)¶
Inherited from MWMVisitMixin. Returns the mwmVisit file path.
e_flux (property)¶
Returns flux uncertainty as ivar**-0.5.
BossCombinedSpectrum¶
A co-added BOSS spectrum created by stacking all good rest-frame visit spectra for a source. This fills the gap left by the BOSS DRP, which does not produce stacked spectra. Stored in mwmStar files. Inherits from MWMStarMixin.
Key Fields¶
Field |
Type |
Description |
|---|---|---|
|
ForeignKeyField |
Unique spectrum identifier |
|
ForeignKeyField |
Foreign key to Source |
|
BigIntegerField |
SDSS-V unique identifier |
|
TextField |
Data release |
|
TextField |
BOSS reduction pipeline version |
|
TextField |
Telescope used |
Observation summary:
Field |
Type |
Description |
|---|---|---|
|
IntegerField |
Number of BOSS visits |
|
IntegerField |
Number of good visits |
|
IntegerField |
Number of good RV measurements |
|
IntegerField |
Minimum MJD of contributing visits |
|
IntegerField |
Maximum MJD of contributing visits |
Radial velocity:
Field |
Type |
Description |
|---|---|---|
|
FloatField |
Mean radial velocity (km/s) |
|
FloatField |
Uncertainty on mean radial velocity (km/s) |
|
FloatField |
Standard deviation of visit radial velocities (km/s) |
|
FloatField |
Median per-visit RV uncertainty (km/s) |
|
FloatField |
Effective temperature from XCSAO |
|
FloatField |
Surface gravity from XCSAO |
|
FloatField |
Metallicity from XCSAO |
Spectral data:
Field |
Type |
Description |
|---|---|---|
|
PixelArray |
Log-lambda grid (4648 pixels, crval=3.5523, cdelt=1e-4) |
|
PixelArray |
Co-added flux |
|
PixelArray |
Co-added inverse variance |
|
PixelArray |
Per-pixel quality flags |
|
FloatField |
Signal-to-noise ratio of co-added spectrum |
NMF continuum model:
Field |
Type |
Description |
|---|---|---|
|
PixelArray |
NMF continuum model |
|
PixelArray |
NMF rectified model flux |
|
FloatField |
Reduced chi-squared of NMF fit |
|
BitField |
NMF continuum method flags |
Methods and Properties¶
path (property)¶
Inherited from MWMStarMixin. Returns the mwmStar file path.
ApogeeCombinedSpectrum¶
A co-added APOGEE spectrum in the MWM framework. Similar in structure to BossCombinedSpectrum but for APOGEE data, using the APOGEE log-lambda grid (8575 pixels, crval=4.179, cdelt=6e-6). Stored in mwmStar files. Inherits from MWMStarMixin.
Key Fields¶
Field |
Type |
Description |
|---|---|---|
|
ForeignKeyField |
Unique spectrum identifier |
|
ForeignKeyField |
Foreign key to Source |
|
BigIntegerField |
SDSS-V unique identifier |
|
TextField |
Data release |
|
TextField |
APOGEE reduction pipeline version |
|
TextField |
Object name |
|
TextField |
Telescope used |
Observation summary:
Field |
Type |
Description |
|---|---|---|
|
IntegerField |
Number of apStar entries for this object |
|
IntegerField |
Number of APOGEE visits |
|
IntegerField |
Number of good visits |
|
IntegerField |
Number of good RV measurements |
|
IntegerField |
Minimum MJD of contributing visits |
|
IntegerField |
Maximum MJD of contributing visits |
Summary statistics and radial velocity:
Field |
Type |
Description |
|---|---|---|
|
FloatField |
Signal-to-noise ratio |
|
FloatField |
S/N-weighted mean visit fiber number |
|
FloatField |
Standard deviation of visit fiber numbers |
|
FloatField |
Mean radial velocity (km/s) |
|
FloatField |
Uncertainty on mean radial velocity (km/s) |
|
FloatField |
Standard deviation of visit radial velocities (km/s) |
|
FloatField |
Effective temperature from Doppler |
|
FloatField |
Surface gravity from Doppler |
|
FloatField |
Metallicity from Doppler |
Spectral data:
Field |
Type |
Description |
|---|---|---|
|
PixelArray |
Log-lambda grid (8575 pixels, crval=4.179, cdelt=6e-6) |
|
PixelArray |
Co-added flux |
|
PixelArray |
Co-added inverse variance |
|
PixelArray |
Per-pixel quality flags |
NMF continuum model:
Field |
Type |
Description |
|---|---|---|
|
PixelArray |
NMF continuum model |
|
PixelArray |
NMF rectified model flux |
|
FloatField |
Reduced chi-squared of NMF fit |
|
BitField |
NMF continuum method flags |
Methods and Properties¶
path (property)¶
Inherited from MWMStarMixin. Returns the mwmStar file path.
ApogeeRestFrameVisitSpectrum¶
An APOGEE visit spectrum resampled onto the common APOGEE log-lambda grid and shifted to the source rest frame. The APOGEE analogue of BossRestFrameVisitSpectrum. Stored in mwmVisit files. Inherits from MWMVisitMixin.
Key Fields¶
Field |
Type |
Description |
|---|---|---|
|
ForeignKeyField |
Unique spectrum identifier |
|
ForeignKeyField |
Foreign key to Source |
|
BigIntegerField |
SDSS-V unique identifier |
|
TextField |
Data release |
|
TextField |
APOGEE reduction pipeline version |
|
TextField |
Telescope used |
|
TextField |
Plate identifier |
|
IntegerField |
Fiber number |
|
IntegerField |
Modified Julian Date |
|
TextField |
Field identifier |
|
TextField |
Object name |
Quality and radial velocity:
Field |
Type |
Description |
|---|---|---|
|
FloatField |
Signal-to-noise ratio |
|
BooleanField |
Whether this visit was used in the combined spectrum |
|
BitField |
Quality flags (same bit definitions as |
|
FloatField |
Absolute radial velocity (km/s) |
|
FloatField |
Relative radial velocity (km/s) |
|
FloatField |
Uncertainty on relative RV (km/s) |
|
FloatField |
Effective temperature from Doppler |
|
FloatField |
Surface gravity from Doppler |
|
FloatField |
Metallicity from Doppler |
Spectral data (source rest frame):
Field |
Type |
Description |
|---|---|---|
|
PixelArray |
Log-lambda grid (8575 pixels, crval=4.179, cdelt=6e-6) |
|
PixelArray |
Flux array |
|
PixelArray |
Inverse variance array |
|
PixelArray |
Per-pixel quality flags |
|
PixelArray |
NMF continuum model |
|
FloatField |
Reduced chi-squared of NMF fit |
Methods and Properties¶
path (property)¶
Inherited from MWMVisitMixin. Returns the mwmVisit file path.
flag_bad (hybrid property)¶
Returns True if any critical quality flags are set. Can be used in database queries.
flag_warn (hybrid property)¶
Returns True if any spectrum flag is set. Can be used in database queries.