SkyDip¶
- class sofia_redux.scan.source_models.sky_dip.SkyDip(info, reduction=None)[source]¶
Bases:
SourceModel
Initialize a skydip model.
The SkyDip source model is used to measure and store a model of the instrument response and atmospheric parameters with respect to the elevation of an observation.
- Parameters:
- infosofia_redux.scan.info.info.Info
The Info object which should belong to this source model.
- reductionsofia_redux.scan.reduction.reduction.Reduction, optional
The reduction for which this source model should be applied.
Attributes Summary
Return the logging ID.
Methods Summary
add_integration
(integration)Add an integration to the sky dip.
add_model_data
(skydip[, weight])Add an increment source model data onto the current model.
average_temp_with
(temp, weight)Average the existing temperature with another.
Clear all memory references prior to deletion.
Clear the SkyDip data contents.
copy
([with_contents])Return a copy of the SkyDip.
Return the number of points in the skydip model.
create_from
(scans[, assign_scans])Initialize a skydip model from scans.
create_plot
(core_name)Write a plot of the model and data to file.
End model accumulation by scaling with inverse weights.
fit
(model)Fit the sky dip data to a model.
Return the range of air masses in the model.
get_bin
(elevation)Return the bin for the given elevation.
get_elevation
(bins)Return the elevation for a given bin or bins.
Return the elevation range of the model.
Get the number of parallel operations for the source model.
Return the reference (x, y) coordinate.
Return the signal range of the SkyDip model.
Return the source name for the sky dip model.
get_table_entry
(name)Return a parameter value for a given name.
get_unit
()Return the unit for the model
is_valid
()Return whether the skydip model is valid or not.
Do not use parallel processing.
process
()Process the skydip model.
process_scan
(scan)Process a scan.
set_base
()Set the base map of the model.
set_executor
(executor)Set the parallel task executor.
set_parallel
(threads)Set the number of parallel operations for the skydip model.
sync_integration
(integration[, signal_mode])Synchronize the sky dip model with an integration.
write
([path])Write the sky dip model to file.
Attributes Documentation
- logging_id¶
Return the logging ID.
- Returns:
- str
Methods Documentation
- add_integration(integration)[source]¶
Add an integration to the sky dip.
- Parameters:
- integrationIntegration
- Returns:
- None
- add_model_data(skydip, weight=1.0)[source]¶
Add an increment source model data onto the current model.
- Parameters:
- skydipSkyDip
The skydip increment.
- weightfloat, optional
The weight of the model increment. Not applicable for the skydip model.
- Returns:
- None
- average_temp_with(temp, weight)[source]¶
Average the existing temperature with another.
- Parameters:
- tempunits.Quantity
The temperature in Kelvins to average with the current temperature.
- weightunits.Quantity
The weight value of
temp
in seconds.
- Returns:
- None
- copy(with_contents=True)[source]¶
Return a copy of the SkyDip.
- Parameters:
- with_contentsbool, optional
If
True
, return a true copy of the source model. Otherwise, just return a basic version with the necessary meta data.
- Returns:
- SkyDip
- create_from(scans, assign_scans=True)[source]¶
Initialize a skydip model from scans.
Sets the model scans to those provided, and the source model for each scan as this. All integration gains are normalized to the first scan. If the first scan is non-sidereal, the system will be forced to an equatorial frame.
- Parameters:
- scanslist (Scan)
A list of scans from which to create the model.
- assign_scansbool, optional
If
True
, assign the scans to this source model. Otherwise, there will be no hard link between the scans and source model.
- Returns:
- None
- create_plot(core_name)[source]¶
Write a plot of the model and data to file.
- Parameters:
- core_namestr
The name of the file to write to including the full file path but excluding the file extension.
- Returns:
- None
- get_bin(elevation)[source]¶
Return the bin for the given elevation.
- Parameters:
- elevationunits.Quantity
- Returns:
- binsint or numpy.ndarray (int)
- get_elevation(bins)[source]¶
Return the elevation for a given bin or bins.
- Parameters:
- binsint or numpy.ndarray (int)
- Returns:
- elevationunits.Quantity
- get_parallel()[source]¶
Get the number of parallel operations for the source model.
Not applicable for the SkyDip model.
- Returns:
- threadsint
- get_reference()[source]¶
Return the reference (x, y) coordinate.
Not applicable for the SkyDip model.
- Returns:
- None
- get_table_entry(name)[source]¶
Return a parameter value for a given name.
- Parameters:
- namestr
- Returns:
- value
- no_parallel()[source]¶
Do not use parallel processing.
Not applicable for the SkyDip model.
- Returns:
- None
- set_base()[source]¶
Set the base map of the model.
This is unused for the SkyDip class.
- Returns:
- None
- set_executor(executor)[source]¶
Set the parallel task executor.
Not applicable for the SkyDip model.
- Parameters:
- executorobject
- Returns:
- None
- set_parallel(threads)[source]¶
Set the number of parallel operations for the skydip model.
Not applicable for the SkyDip model.
- Parameters:
- threadsint
- Returns:
- None
- sync_integration(integration, signal_mode=None)[source]¶
Synchronize the sky dip model with an integration.
This is not used for the
SkyDip
class.- Parameters:
- integrationIntegration
- signal_modeFrameFlagTypes
The signal mode flag, indicating which signal should be used to extract the frame source gains. Typically, TOTAL_POWER.
- Returns:
- None