From 5759c19a0ce7cfe66d6230f77c078c84ab516875 Mon Sep 17 00:00:00 2001 From: Ken MacDonald Date: Fri, 3 Jan 2025 20:47:26 -0500 Subject: [PATCH] Adding a docstring. --- src/stcal/jump/twopoint_difference.py | 37 +++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/stcal/jump/twopoint_difference.py b/src/stcal/jump/twopoint_difference.py index 0ae9c231..76405f6d 100644 --- a/src/stcal/jump/twopoint_difference.py +++ b/src/stcal/jump/twopoint_difference.py @@ -10,11 +10,48 @@ def find_crs(dataa, group_dq, read_noise, twopt_p): + """ + An interface between the detect_jumps_data function and the + find_crs_old function using the TwoPointParams class that makes + adding and removing parameters when using the two point + difference without necessitating a change to the find_crs + function signature. + + XXX The find_crs_old should be refactored in the same way as the + functions in the jump.py file, as well as making use of the + TwoPointParams class. This can be done on a later PR. + + Parameters + ---------- + dataa: float, 4D array (num_ints, num_groups, num_rows, num_cols) + input ramp data + + group_dq : int, 4D array + group DQ flags + + read_noise : float, 2D array + The read noise of each pixel + + twopt_p : TwoPointParams + Class containing two point difference parameters. + + Returns + ------- + gdq : int, 4D array + group DQ array with reset flags + + row_below_gdq : int, 3D array (num_ints, num_groups, num_cols) + pixels below current row also to be flagged as a CR + + row_above_gdq : int, 3D array (num_ints, num_groups, num_cols) + pixels above current row also to be flagged as a CR + """ dqflags = { "SATURATED" : twopt_p.fl_sat, "DO_NOT_USE" : twopt_p.fl_dnu, "JUMP_DET" : twopt_p.fl_jump, } + return find_crs_old( dataa, group_dq,