Usage#

How do I use simpunch?#

To begin, you’ll need sample model data with which to pass through the pipeline. During development, we used this tool extensively with GAMERA model data passed through FORWARD to produce integrated values of total brightness and polarized brightness along a particular line of sight through the model. An outline of the overall flow, along with each individual processing level is given below.

Overall flow#

To run the entire simpunch processing pipeline with input model data, the simpunch.flow.generate_flow function can be called.

simpunch.flow.generate_flow(file_tb: str, file_pb: str, time_obs: datetime, out_dir: str, backward_psf_model_path: str | Callable, wfi_quartic_backward_model_path: str | Callable, nfi_quartic_backward_model_path: str | Callable, transient_probability: float = 0.03, shift_pointing: bool = False) list[str][source]

Generate all the products in the reverse pipeline.

Level 0#

To generate level 0 data in the mzp polarized framework, the simpunch.level0.generate_l0_pmzp function can be called.

simpunch.level0.generate_l0_pmzp(input_file: str, path_output: str, psf_model_path: str | Callable, wfi_quartic_coeffs_path: str | Callable, nfi_quartic_coeffs_path: str | Callable, transient_probability: float = 0.03, shift_pointing: bool = False) str[source]

Generate level 0 polarized synthetic data.

To generate level 0 clear data, the simpunch.level0.generate_l0_cr function can be called.

simpunch.level0.generate_l0_cr(input_file: str, path_output: str, psf_model_path: str | Callable, wfi_quartic_coeffs_path: str | Callable, nfi_quartic_coeffs_path: str | Callable, transient_probability: float = 0.03, shift_pointing: bool = False) str[source]

Generate level 0 clear synthetic data.

Level 1#

To generate level 1 data in the mzp polarized framework, the simpunch.level1.generate_l1_pmzp function can be called.

simpunch.level1.generate_l1_pmzp(input_file: str, path_output: str, rotation_stage: int, spacecraft_id: str) list[str][source]

Generate level 1 polarized synthetic data.

To generate level 1 clear data, the simpunch.level1.generate_l1_cr function can be called.

simpunch.level1.generate_l1_cr(input_file: str, path_output: str, rotation_stage: int, spacecraft_id: str) str[source]

Generate level 1 clear synthetic data.

Level 2#

To generate a level 2 polarized trefoil mosaic, the simpunch.level2.generate_l2_ptm function can be called.

simpunch.level2.generate_l2_ptm(input_file: str, path_output: str) str[source]

Generate level 2 PTM synthetic data.

To generate a level 2 clear trefoil mosaic, the simpunch.level2.generate_l2_ctm function can be called.

simpunch.level2.generate_l2_ctm(input_file: str, path_output: str) str[source]

Generate level 2 CTM synthetic data.

Level 3#

To generate a level 3 polarized trefoil mosaic, the simpunch.level2.generate_l3_ptm function can be called.

simpunch.level3.generate_l3_ptm(input_tb: str, input_pb: str, path_output: str, time_obs: datetime, time_delta: timedelta, rotation_stage: int) str[source]

Generate PTM - PUNCH Level-3 Polarized Mosaic.

To generate a level 3 clear trefoil mosaic, the simpunch.level2.generate_l3_ctm function can be called.

simpunch.level3.generate_l3_ctm(input_tb: str, path_output: str, time_obs: datetime, time_delta: timedelta, rotation_stage: int) str[source]

Generate CTM - PUNCH Level-3 Clear Mosaic.