Models¶
blipss.models.base
¶
Shared base class for blipss config models.
BlipssConfigModel
¶
Bases: BaseModel
Base for config models where a blank/null YAML field is treated as absent, falling back to the field's declared default.
blipss.models.compare_cands
¶
Pydantic models for validating input configs read from config/compare_cands.yaml
CandidateGroupingConfig
¶
Bases: BlipssConfigModel
cluster_radius_positive(v)
classmethod
¶
Validate that the clustering radius is positive.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
v
|
float
|
Clustering radius from the config. |
required |
Returns:
| Type | Description |
|---|---|
float
|
The validated clustering radius. |
Raises:
| Type | Description |
|---|---|
ValueError
|
When the clustering radius is not positive. |
Source code in blipss/models/compare_cands.py
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | |
n_jobs_valid(v)
classmethod
¶
Validate that n_jobs is a positive worker count.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
v
|
int
|
Worker process count from the config. |
required |
Returns:
| Type | Description |
|---|---|
int
|
The validated worker process count. |
Raises:
| Type | Description |
|---|---|
ValueError
|
When n_jobs is not positive. |
Source code in blipss/models/compare_cands.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | |
CompareCandsConfig
¶
Bases: BlipssConfigModel
labels_match_csv_list()
¶
Validate that one pointing label is provided per candidate CSV file.
Returns:
| Type | Description |
|---|---|
CompareCandsConfig
|
The model instance, unchanged. |
Raises:
| Type | Description |
|---|---|
ValueError
|
When the number of labels does not match the number of CSV files. |
Source code in blipss/models/compare_cands.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | |
OnOffClassificationConfig
¶
Bases: BlipssConfigModel
cutoff_positive(v)
classmethod
¶
Validate that an S/N cutoff is positive.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
v
|
float
|
Cutoff value from the config. |
required |
Returns:
| Type | Description |
|---|---|
float
|
The validated cutoff value. |
Raises:
| Type | Description |
|---|---|
ValueError
|
When the cutoff is non-negative. |
Source code in blipss/models/compare_cands.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | |
labels_are_on_or_off(v)
classmethod
¶
Validate that every label is either 'ON' or 'OFF'.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
v
|
list[str]
|
Uppercased label strings. |
required |
Returns:
| Type | Description |
|---|---|
list[str]
|
The validated label strings. |
Raises:
| Type | Description |
|---|---|
ValueError
|
When any label is not 'ON' or 'OFF'. |
Source code in blipss/models/compare_cands.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | |
uppercase_labels(v)
classmethod
¶
Normalise pointing labels to uppercase.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
v
|
list[str]
|
Raw label strings from the config. |
required |
Returns:
| Type | Description |
|---|---|
list[str]
|
Labels converted to uppercase. |
Source code in blipss/models/compare_cands.py
26 27 28 29 30 31 32 33 34 35 36 37 38 | |
blipss.models.compute_phase_resolved_ds
¶
Pydantic models for validating input configs read from config/phaseresolved_ds.yaml
PhaseResolvedDsConfig
¶
Bases: BlipssConfigModel
resolve_output_defaults()
¶
Resolve plot_dir default from input data configuration.
Returns:
| Type | Description |
|---|---|
PhaseResolvedDsConfig
|
The model instance with plot_dir resolved. |
Source code in blipss/models/compute_phase_resolved_ds.py
90 91 92 93 94 95 96 97 98 99 100 | |
blipss.models.inject_signal
¶
Pydantic models for validating input configs read from config/inject_signal.yaml
InjectSignalConfig
¶
Bases: BlipssConfigModel
resolve_defaults()
¶
Resolve output_ext and output_dir defaults from input data configuration.
Returns:
| Type | Description |
|---|---|
InjectSignalConfig
|
The model instance with resolved defaults. |
Source code in blipss/models/inject_signal.py
58 59 60 61 62 63 64 65 66 67 68 69 70 | |
OutputConfig
¶
Bases: BlipssConfigModel
validate_output_ext(v)
classmethod
¶
Validate that the output extension is a recognised filterbank format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
v
|
str
|
The output extension string from the config. |
required |
Returns:
| Type | Description |
|---|---|
str
|
The validated extension string. |
Raises:
| Type | Description |
|---|---|
ValueError
|
When the extension is non-empty but not .fil or .h5. |
Source code in blipss/models/inject_signal.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | |
blipss.models.plot_cands
¶
Pydantic models for validating input configs read from config/plot_cands.yaml
InputDataConfig
¶
Bases: BlipssConfigModel
resolve_beam_labels()
¶
Default beam_labels to one blank label per data file.
Returns:
| Type | Description |
|---|---|
InputDataConfig
|
The model instance with beam_labels resolved. |
Source code in blipss/models/plot_cands.py
19 20 21 22 23 24 25 26 27 28 29 | |
PlotCandsConfig
¶
Bases: BlipssConfigModel
resolve_plot_dir()
¶
Resolve plot_dir default from input data configuration.
Returns:
| Type | Description |
|---|---|
PlotCandsConfig
|
The model instance with plot_dir resolved. |
Source code in blipss/models/plot_cands.py
65 66 67 68 69 70 71 72 73 74 75 | |
blipss.models.run_ffa_search
¶
Pydantic models for validating input configs read from a blipss YAML config file.
blipss.models.simulate_data
¶
Pydantic models for validating input configs read from config/simulate_data.yaml