draco.synthesis.stream
Tasks for simulating sidereal and time stream data.
A typical pattern would be to turn a map into a
containers.SiderealStream
with the SimulateSidereal
task, then
expand any redundant products with ExpandProducts
and finally generate
a set of time stream files with MakeTimeStream
.
Classes
Un-wrap collated products to full triangle. |
|
Generate a series of time streams files from a sidereal stream. |
|
Task for simulating a set of sidereal days from a given stream. |
|
Generate a time stream from a sidereal stream. |
|
Make multiple time streams from a single input. |
|
Make multiple time streams for fixed time samples. |
|
Create a simulated sidereal dataset from an input map. |
- class draco.synthesis.stream.ExpandProducts[source]
Bases:
SingleTask
Un-wrap collated products to full triangle.
Initialize pipeline task.
May be overridden with no arguments. Will be called after any config.Property attributes are set and after ‘input’ and ‘requires’ keys are set up.
- class draco.synthesis.stream.MakeMultipleTimeStreams[source]
Bases:
MakeTimeStreamFixedInput
Generate a series of time streams files from a sidereal stream.
- Parameters:
start_time (float or datetime) – Start and end times of the timestream to simulate. Needs to be either a float (UNIX time) or a datetime objects in UTC.
end_time (float or datetime) – Start and end times of the timestream to simulate. Needs to be either a float (UNIX time) or a datetime objects in UTC.
integration_time (float, optional) – Integration time in seconds. Takes precedence over integration_frame_exp.
integration_frame_exp (int, optional) – Specify the integration time in frames. The integration time is 2**integration_frame_exp * 2.56 us.
samples_per_file (int, optional) – Number of samples per file.
Initialize pipeline task.
May be overridden with no arguments. Will be called after any config.Property attributes are set and after ‘input’ and ‘requires’ keys are set up.
- class draco.synthesis.stream.MakeSiderealDayStream[source]
Bases:
SingleTask
Task for simulating a set of sidereal days from a given stream.
This creates a copy of the base stream for every LSD within the provided time range.
- start_time, end_time
Start and end times of the sidereal streams to simulate. Needs to be either a float (UNIX time) or a datetime objects in UTC.
- Type:
float or datetime
Initialize pipeline task.
May be overridden with no arguments. Will be called after any config.Property attributes are set and after ‘input’ and ‘requires’ keys are set up.
- process()[source]
Generate a sidereal stream for the specific sidereal day.
- Returns:
ss – Simulated sidereal day stream.
- Return type:
containers.SiderealStream
- setup(bt, sstream)[source]
Set up an observer and the data to use for this simulation.
- Parameters:
bt (beamtransfer.BeamTransfer or manager.ProductManager) – Sets up an observer holding the geographic location of the telscope.
sstream (containers.SiderealStream) – The base sidereal data to use for this simulation.
- class draco.synthesis.stream.MakeTimeStream[source]
Bases:
SingleTask
Generate a time stream from a sidereal stream.
Requires an input dataset with a time axis to mimic.
- lanczos_width
Width of the Lanczos interpolation kernel.
- Type:
int
Initialize pipeline task.
May be overridden with no arguments. Will be called after any config.Property attributes are set and after ‘input’ and ‘requires’ keys are set up.
- process(sstream, tstream)[source]
Sample the sidereal stream at a set of times.
- Parameters:
sstream (containers.SiderealStream | containers.HybridVisStream) – Dataset sampled in RA
tstream (containers.TODContainer | HybridVisStream) – Dataset sampled in time
- Returns:
timestream – sstream data sampled in time
- Return type:
- class draco.synthesis.stream.MakeTimeStreamFixedInput[source]
Bases:
MakeTimeStream
Make multiple time streams from a single input.
Initialize pipeline task.
May be overridden with no arguments. Will be called after any config.Property attributes are set and after ‘input’ and ‘requires’ keys are set up.
- process(tstream)[source]
Sample the saved sidereal stream at tstream time samples.
- Parameters:
tstream (containers.TODContainer) – Dataset sampled in time
- Returns:
timestream – sstream data sampled in time
- Return type:
- setup(observer, sstream)[source]
Set up a telescope object and save the input stream.
- Parameters:
observer (ProductManager) – Telescope manager
sstream (containers.SiderealStream | containers.HybridVisStream) – Input sidereal dataset
- class draco.synthesis.stream.MakeTimeStreamFixedTime[source]
Bases:
MakeTimeStream
Make multiple time streams for fixed time samples.
Initialize pipeline task.
May be overridden with no arguments. Will be called after any config.Property attributes are set and after ‘input’ and ‘requires’ keys are set up.
- process(sstream)[source]
Sample the sidereal stream at saved time samples.
- Parameters:
sstream (containers.SiderealSteam | containers.HybridVisStream) – Dataset sampled in time
- Returns:
timestream – sstream data sampled in time
- Return type:
- setup(observer, tstream)[source]
Set up a telescope object and save the input timestream.
- Parameters:
observer (ProductManager) – Telescope manager
tstream (containers.TODContainer) – Input sidereal dataset
- class draco.synthesis.stream.SimulateSidereal[source]
Bases:
SingleTask
Create a simulated sidereal dataset from an input map.
- stacked
When set, in the case that the beam transfer matrices are not full triangle treat them as having been generated by collating the baselines of full triangle data, and set appropriate index_map/stack and reverse_map/stack entries. If not set, treat the entries as having been generated by down selecting the full set of baselines, and thus don’t create the stack entries. Default is True.
- Type:
bool
Initialize pipeline task.
May be overridden with no arguments. Will be called after any config.Property attributes are set and after ‘input’ and ‘requires’ keys are set up.
- process(map_)[source]
Simulate a SiderealStream.
- Parameters:
map (
containers.Map
) – The sky map to process to into a sidereal stream. Frequencies in the map, must match the Beam Transfer matrices.- Returns:
ss (SiderealStream) – Stacked sidereal day.
feeds (list of CorrInput) – Description of the feeds simulated.