draco.analysis.sourcestack
Source Stack Analysis Tasks.
Classes
Accumulate many frequency stacks into a single container. |
|
Take a large mock catalog and draw number catalogs of a given size. |
|
Stack the product of draco.analysis.BeamForm accross sources. |
- class draco.analysis.sourcestack.GroupSourceStacks[source]
Bases:
SingleTask
Accumulate many frequency stacks into a single container.
- ngroup
The number of frequency stacks to accumulate into a single container.
- 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(stack)[source]
Add a FrequencyStack to the list.
As soon as list contains ngroup items, they will be collapsed into a single container and output by the task.
- Parameters:
stack (containers.FrequencyStack, containers.FrequencyStackByPol,) – containers.MockFrequencyStack, containers.MockFrequencyStackByPol
- Returns:
out – The previous ngroup FrequencyStacks accumulated into a single container.
- Return type:
containers.MockFrequencyStack, containers.MockFrequencyStackByPol
- process_finish()[source]
Return whatever FrequencyStacks are currently in the list.
- Returns:
out – The remaining frequency stacks accumulated into a single container.
- Return type:
containers.MockFrequencyStack, containers.MockFrequencyStackByPol
- class draco.analysis.sourcestack.RandomSubset[source]
Bases:
SingleTask
,RandomTask
Take a large mock catalog and draw number catalogs of a given size.
- number
Number of catalogs to construct.
- Type:
int
- size
Number of objects in each catalog.
- 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()[source]
Draw a new random catalog.
- Returns:
new_catalog – A catalog of the same type as the input catalog, with a random set of objects.
- Return type:
- setup(catalog)[source]
Set the full mock catalog.
- Parameters:
catalog (containers.SourceCatalog or containers.FormedBeam) – The mock catalog to draw from.
- class draco.analysis.sourcestack.SourceStack[source]
Bases:
SingleTask
Stack the product of draco.analysis.BeamForm accross sources.
For this to work BeamForm must have been run with collapse_ha = True (default).
- freqside
Number of frequency bins to keep on each side of source bin when stacking. Default: 50.
- Type:
int
- single_source_bin_index
Only stack on sources in frequency bin with this index. Useful for isolating stacking signal from a narrow frequency range. Default: None.
- Type:
int, 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.