draco.core.misc
Miscellaneous pipeline tasks with no where better to go.
Tasks should be proactively moved out of here when there is a thematically appropriate module, or enough related tasks end up in here such that they can all be moved out into their own module.
Classes
Accumulate the inputs into a list and return as a group. |
|
Apply a set of gains to a timestream or sidereal stack. |
|
Check that the current MPI environment can communicate across all nodes. |
|
Output some useful debug info. |
|
|
Make a copy of the passed container. |
|
Unconditionally forward a tasks input. |
Wait until the the requires before forwarding inputs. |
- class draco.core.misc.AccumulateList[source]
Bases:
MPILoggedTask
Accumulate the inputs into a list and return as a group.
If group_size is None, return when the task finishes. Otherwise, return every time group_size inputs have been accumulated.
- group_size
If this is set, this task will return the list of accumulated data whenever it reaches this length. If not set, wait until no more input is received and then return everything.
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.core.misc.ApplyGain[source]
Bases:
SingleTask
Apply a set of gains to a timestream or sidereal stack.
- inverse
Apply the gains directly, or their inverse.
- Type:
bool, optional
- update_weight
Scale the weight array with the updated gains.
- Type:
bool, optional
- smoothing_length
Smooth the gain timestream across the given number of seconds. Not supported (ignored) for Sidereal Streams.
- Type:
float, optional
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, gain)[source]
Apply gains to the given timestream.
Smoothing the gains is not supported for SiderealStreams.
- Parameters:
tstream (TimeStream like or SiderealStream) – Time stream to apply gains to. The gains are applied in place.
gain (StaticGainData, GainData, SiderealGainData, CommonModeGainData) – or CommonModeSiderealGainData. Gains to apply.
- Returns:
tstream – The timestream with the gains applied.
- Return type:
- class draco.core.misc.CheckMPIEnvironment[source]
Bases:
MPILoggedTask
Check that the current MPI environment can communicate across all nodes.
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.core.misc.DebugInfo[source]
Bases:
MPILoggedTask
,SetMPILogging
Output some useful debug info.
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.core.misc.MakeCopy[source]
Bases:
SingleTask
Make a copy of the passed container.
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(data)[source]
Return a copy of the given container.
- Parameters:
data (containers.ContainerBase) – The container to copy.
- class draco.core.misc.PassOn[source]
Bases:
MPILoggedTask
Unconditionally forward a tasks input.
While this seems like a pointless no-op it’s useful for connecting tasks in complex topologies.
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.core.misc.WaitUntil[source]
Bases:
MPILoggedTask
Wait until the the requires before forwarding inputs.
This simple synchronization task will forward on whatever inputs it gets, however, it won’t do this until it receives any requirement to it’s setup method. This allows certain parts of the pipeline to be delayed until a piece of data further up has been generated.
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.