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

logging_id

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()

Clear all memory references prior to deletion.

clear_content()

Clear the SkyDip data contents.

copy([with_contents])

Return a copy of the SkyDip.

count_points()

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_accumulation()

End model accumulation by scaling with inverse weights.

fit(model)

Fit the sky dip data to a model.

get_air_mass_range()

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.

get_elevation_range()

Return the elevation range of the model.

get_parallel()

Get the number of parallel operations for the source model.

get_reference()

Return the reference (x, y) coordinate.

get_signal_range()

Return the signal range of the SkyDip model.

get_source_name()

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.

no_parallel()

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
clear_all_memory()[source]

Clear all memory references prior to deletion.

Returns:
None
clear_content()[source]

Clear the SkyDip data contents.

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
count_points()[source]

Return the number of points in the skydip model.

Returns:
int
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
end_accumulation()[source]

End model accumulation by scaling with inverse weights.

Returns:
None
fit(model)[source]

Fit the sky dip data to a model.

Parameters:
modelSkyDipModel
Returns:
None
get_air_mass_range()[source]

Return the range of air masses in the model.

Returns:
Range
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_elevation_range()[source]

Return the elevation range of the model.

Returns:
Range
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_signal_range()[source]

Return the signal range of the SkyDip model.

Returns:
Range
get_source_name()[source]

Return the source name for the sky dip model.

Returns:
str
get_table_entry(name)[source]

Return a parameter value for a given name.

Parameters:
namestr
Returns:
value
get_unit()[source]

Return the unit for the model

Returns:
units.Unit
is_valid()[source]

Return whether the skydip model is valid or not.

Returns:
bool
no_parallel()[source]

Do not use parallel processing.

Not applicable for the SkyDip model.

Returns:
None
process()[source]

Process the skydip model.

Not applicable for the SkyDip model.

Returns:
None
process_scan(scan)[source]

Process a scan.

Parameters:
scanScan
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
write(path=None)[source]

Write the sky dip model to file.

Parameters:
pathstr, optional

The directory in which to write the results. The default is the reduction work path.

Returns:
None