Skip to content

Commit

Permalink
Adding a docstring.
Browse files Browse the repository at this point in the history
  • Loading branch information
kmacdonald-stsci committed Jan 4, 2025
1 parent df33059 commit 5759c19
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions src/stcal/jump/twopoint_difference.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5759c19

Please sign in to comment.