Configuration File
PulsarSA needs a configuration file in yaml format named config_pipe.yml to set the pipeline prameters. This config file is necessary for certain methods to automatically detect pipeline parameters. Ofcource pipeline module can be instantiated separately by the user. Below describes the parameters associated with PulsarSA in the config_pipe.yml file:
pulsarsa:
allow_image_as_input_to_filter: 0
filternet: ModUNetv4
filternet_name: cnn_filter.pt
image2masknet: ModUNetv4
image2masknet_name: cnn.pt
learning_rate: 0.001
loss_function: DiceLoss
min_axis_ratio: 4
min_cc_size_threshold: 10
ml_flow_folder: ./mlflows/
num_cpus_training: 10
num_epochs: 80
pipeline: PipelineImageToFilterToCCtoLabels
plot_validation_samples_at: ./outputs/validation_set_*.png
preferred_label: null
skip_filter: 1
train_test_split: 0.5
return_snr: 1
snr_thresh: 4
box_func_window: 3
corr_thresh: 5
batch_size: 50
Parameter Descriptions for PulsarSA
allow_image_as_input_to_filter (int): If set to
1, allows direct image input to the filter network;0disables it.filternet (str): The neural network architecture used for filtering (e.g.,
ModUNetv4).filternet_name (str): Path or filename of the trained filter network weights (e.g.,
cnn_filter.pt).image2masknet (str): The network used for converting images to segmentation masks.
image2masknet_name (str): Path or filename of the trained image-to-mask model (e.g.,
cnn.pt).learning_rate (float): Learning rate used during training.
loss_function (str): Loss function to optimize (e.g.,
DiceLoss).min_axis_ratio (float): Minimum major-to-minor axis ratio for considering connected components (CCs) as elongated structures.
min_cc_size_threshold (int): Minimum pixel size of a connected component to be considered valid.
ml_flow_folder (str): Directory to store MLflow experiment logs and artifacts.
num_cpus_training (int): Number of CPU cores used during training.
num_epochs (int): Number of training epochs.
pipeline (str): Defines the processing pipeline (e.g.,
PipelineImageToFilterToCCtoLabels).plot_validation_samples_at (str): Path pattern for saving validation sample outputs.
preferred_label (str or null): Preferred label for output class (optional).
skip_filter (int): If
1, skips the filtering step and passes raw image data to subsequent stages.train_test_split (float): Fraction of data used for training (e.g.,
0.5means 50% training, 50% testing).return_snr (int): If
1, computes and returns signal-to-noise ratio (SNR) metrics.snr_thresh (float): Threshold value for SNR filtering.
box_func_window (int): Window size used in the box function for smoothing or correlation.
corr_thresh (float): Threshold for correlation filtering between images or layers.
batch_size (int): Number of samples per training batch.
In the same config_pipe.yml for PulsarSA the user also needs to specify the simulation parameters for PulsarDT if the user intends to generate and train the neural networks used. Below is the description of PulsarDT parameters:
pulsardt:
num_cpus_for_gen_data: 10
num_payloads_for_fitting: 200
num_payloads_for_testing: 100
num_payloads_for_training: 1000
tag_for_testing: test_
tag_for_training: train_
tag_gor_fitting: tmp_s
unit_defines:
TIME: ms
FREQUENCY: GHz
DISTANCE: parsec
spark_constants:
spark_radius_thresh_factor: 5
spark_spectral_model: 0
spectral_index: -0.47
spark_pattern_params:
spark_dimension: 0.02
num_sparks: [6,6]
conal_latitudes: [0.1,179.9]
drift_vel: 0.1
spark_rotation_axis_polar_att0: [45,50]
avg_spark_pattern_center_tilt: 45
avg_spark_pattern_params:
num_cones: 1
avg_spark_dimension: .05
avg_spark_per_cone_length: 6
avg_spark_pattern_center_tilt: 45
avg_drift_vel: 1
avg_ism_params:
avg_dm_homogeneous: 57
std_dm: 30
avg_scintillation_index_homo: 1
std_scintillation_index: 100
telescope_params:
freq_channels: [1.459,1.587,0.0005]
rot_phases: [0,360,1]
antenna_sensitivity: 0.5
noise_amplitude_range: [1,1.4]
BBRFI_samples_prob: 0.2
NBRFI_samples_prob: 0.2
scale_direction_randomness: 0.1
Parameter Descriptions for PulsarDT
General Parameters
num_cpus_for_gen_data (int): Number of CPU cores to use for data generation.
num_payloads_for_training (int): Number of payloads (datasets) generated for training.
num_payloads_for_testing (int): Number of payloads generated for testing.
num_payloads_for_fitting (int): Number of payloads generated for model fitting.
tag_for_training (str): Prefix used for naming or labeling training datasets.
tag_for_testing (str): Prefix used for naming or labeling test datasets.
tag_gor_fitting (str): Prefix for temporary fitting datasets (likely a typo of “tag_for_fitting”).
Unit Definitions
TIME (str): The base time unit used in simulations (e.g.,
ms).FREQUENCY (str): The base frequency unit (e.g.,
GHz).DISTANCE (str): The base distance unit (e.g.,
parsec).
Spark Constants
spark_radius_thresh_factor (float): Factor defining the threshold for acceptable spark radius variation.
spark_spectral_model (int): Model type used for the spark spectral distribution (
0= default).spectral_index (float): Power-law spectral index governing spark emission intensity.
Spark Pattern Parameters
spark_dimension (float): Characteristic size of an individual spark.
num_sparks (list[int, int]): Number of sparks in the pattern, typically per conal ring.
conal_latitudes (list[float, float]): Latitude bounds (in degrees) for conal spark distribution.
drift_vel (float): Spark drift velocity, representing the rotational drift of the emission pattern.
spark_rotation_axis_polar_att0 (list[float, float]): Polar angle range (in degrees) for spark rotation axis orientation.
avg_spark_pattern_center_tilt (float): Average tilt (in degrees) of the spark pattern center.
Average Spark Pattern Parameters
num_cones (int): Number of emission cones in the average pattern.
avg_spark_dimension (float): Average dimension of sparks in the overall pattern.
avg_spark_per_cone_length (int): Average number of sparks per conal section.
avg_spark_pattern_center_tilt (float): Average tilt angle of the conal pattern.
avg_drift_vel (float): Average drift velocity across all cones.
Interstellar Medium (ISM) Parameters
avg_dm_homogeneous (float): Average dispersion measure (DM) for a homogeneous interstellar medium.
std_dm (float): Standard deviation of dispersion measure variations.
avg_scintillation_index_homo (float): Average scintillation index in a homogeneous ISM.
std_scintillation_index (float): Standard deviation of the scintillation index.
Telescope Parameters
freq_channels (list[float, float, float]): Frequency channel range and step size in GHz — typically
[start, stop, step].rot_phases (list[float, float, float]): Range of rotation phases in degrees and the phase increment.
antenna_sensitivity (float): Sensitivity of the telescope’s receiving antenna.
noise_amplitude_range (list[float, float]): Minimum and maximum amplitude of simulated noise.
BBRFI_samples_prob (float): Probability of broadband radio frequency interference in samples.
NBRFI_samples_prob (float): Probability of narrowband radio frequency interference in samples.
scale_direction_randomness (float): Randomness factor applied to scaling and direction variations in the signal.