Skip to content

Commit

Permalink
clean up extra parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
mwregan2 committed Feb 5, 2024
1 parent af6fbca commit 7c11971
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 56 deletions.
30 changes: 15 additions & 15 deletions tests/test_ramp_fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def base_neg_med_rates_multi_integrations():
# Run ramp fit on RampData
buffsize, save_opt, algo, wt, ncores = 512, True, "OLS", "optimal", "none"
slopes, cube, optional, gls_dummy = ramp_fit_data(
ramp_data, buffsize, save_opt, rnoise, gain, algo, wt, ncores, dqflags, avg_dark_current
ramp_data, buffsize, save_opt, rnoise, gain, algo, wt, ncores
)

return slopes, cube, optional, gls_dummy, dims
Expand Down Expand Up @@ -216,7 +216,7 @@ def base_neg_med_rates_single_integration_multi_segment():
# Run ramp fit on RampData
buffsize, save_opt, algo, wt, ncores = 512, True, "OLS", "optimal", "none"
slopes, cube, optional, gls_dummy = ramp_fit_data(
ramp_data, buffsize, save_opt, rnoise, gain, algo, wt, ncores, dqflags, avg_dark_current
ramp_data, buffsize, save_opt, rnoise, gain, algo, wt, ncores,
)

return slopes, cube, optional, gls_dummy, dims
Expand Down Expand Up @@ -277,7 +277,7 @@ def test_utils_dq_compress_final():
# Run ramp fit on RampData
buffsize, save_opt, algo, wt, ncores = 512, True, "OLS", "optimal", "none"
slopes, cube, optional, gls_dummy = ramp_fit_data(
ramp_data, buffsize, save_opt, rnoise, gain, algo, wt, ncores, dqflags, avg_dark_current
ramp_data, buffsize, save_opt, rnoise, gain, algo, wt, ncores,
)

dq = slopes[1]
Expand Down Expand Up @@ -356,7 +356,7 @@ def test_miri_ramp_dnu_at_ramp_beginning():
# Run ramp fit on RampData
buffsize, save_opt, algo, wt, ncores = 512, True, "OLS", "optimal", "none"
slopes1, cube, optional, gls_dummy = ramp_fit_data(
ramp_data, buffsize, save_opt, rnoise, gain, algo, wt, ncores, dqflags, avg_dark_current
ramp_data, buffsize, save_opt, rnoise, gain, algo, wt, ncores,
)

s1 = slopes1[0]
Expand All @@ -378,7 +378,7 @@ def test_miri_ramp_dnu_and_jump_at_ramp_beginning():
# Run ramp fit on RampData
buffsize, save_opt, algo, wt, ncores = 512, True, "OLS", "optimal", "none"
slopes2, cube, optional, gls_dummy = ramp_fit_data(
ramp_data, buffsize, save_opt, rnoise, gain, algo, wt, ncores, dqflags, avg_dark_current
ramp_data, buffsize, save_opt, rnoise, gain, algo, wt, ncores,
)

s2 = slopes2[0]
Expand Down Expand Up @@ -449,7 +449,7 @@ def test_2_group_cases():
# Run ramp fit on RampData
buffsize, save_opt, algo, wt, ncores = 512, True, "OLS", "optimal", "none"
slopes, cube, optional, gls_dummy = ramp_fit_data(
ramp_data, buffsize, save_opt, rnoise, gain, algo, wt, ncores, dqflags, avg_dark_current
ramp_data, buffsize, save_opt, rnoise, gain, algo, wt, ncores,
)

# Check the outputs
Expand Down Expand Up @@ -525,7 +525,7 @@ def run_one_group_ramp_suppression(nints, suppress):
save_opt, ncores, bufsize = False, "none", 1024 * 30000
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp_data, bufsize, save_opt, rnoise2d, gain2d, algo,
"optimal", ncores, dqflags, avg_dark_current
"optimal", ncores,
)

return slopes, cube, dims
Expand Down Expand Up @@ -799,7 +799,7 @@ def test_zeroframe():
algo, save_opt, ncores, bufsize = "OLS", False, "none", 1024 * 30000
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp_data, bufsize, save_opt, rnoise, gain, algo,
"optimal", ncores, dqflags, avg_dark_current)
"optimal", ncores,)

tol = 1.0e-5

Expand Down Expand Up @@ -917,7 +917,7 @@ def test_only_good_0th_group():
algo, save_opt, ncores, bufsize = "OLS", False, "none", 1024 * 30000
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp_data, bufsize, save_opt, rnoise, gain, algo,
"optimal", ncores, dqflags, avg_dark_current
"optimal", ncores,
)

tol = 1.0e-5
Expand Down Expand Up @@ -967,7 +967,7 @@ def test_all_sat():
algo, save_opt, ncores, bufsize = "OLS", False, "none", 1024 * 30000
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp, bufsize, save_opt, rnoise, gain, algo,
"optimal", ncores, dqflags, avg_dark_current
"optimal", ncores,
)

assert slopes is None
Expand Down Expand Up @@ -997,7 +997,7 @@ def test_dq_multi_int_dnu():
avg_dark_current = 0.0
algo, save_opt, ncores, bufsize = "OLS", False, "none", 1024 * 30000
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores, dqflags, avg_dark_current)
ramp, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores,)

tol = 1.0e-5

Expand Down Expand Up @@ -1094,7 +1094,7 @@ def test_multi_more_cores_than_rows():

bufsize, algo, save_opt, ncores = 512, "OLS", False, "all"
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores, dqflags, avg_dark_current
ramp, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores,
)
# This part of the test is simply to make sure ramp fitting
# doesn't crash. No asserts are necessary here.
Expand Down Expand Up @@ -1245,7 +1245,7 @@ def test_new_saturation():
avg_dark_current = 0.0
save_opt, ncores, bufsize, algo = False, "none", 1024 * 30000, "OLS"
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp, bufsize, save_opt, rnoise, gain, algo,"optimal", ncores, dqflags, avg_dark_current
ramp, bufsize, save_opt, rnoise, gain, algo,"optimal", ncores,
)

tol = 1.0e-5
Expand Down Expand Up @@ -1335,7 +1335,7 @@ def test_invalid_integrations():

save_opt, ncores, bufsize, algo = False, "none", 1024 * 30000, "OLS"
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp, bufsize, save_opt, rnoise, gain, algo,"optimal", ncores, dqflags, avg_dark_current
ramp, bufsize, save_opt, rnoise, gain, algo,"optimal", ncores,
)

tol = 1.0e-5
Expand Down Expand Up @@ -1397,7 +1397,7 @@ def test_one_group():
avg_dark_current = 0.0
save_opt, ncores, bufsize, algo = False, "none", 1024 * 30000, "OLS"
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp, bufsize, save_opt, rnoise, gain, algo,"optimal", ncores, dqflags, avg_dark_current
ramp, bufsize, save_opt, rnoise, gain, algo,"optimal", ncores,
)

tol = 1e-5
Expand Down
34 changes: 17 additions & 17 deletions tests/test_ramp_fitting_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def test_pix_0():
avg_dark_current = 0.0
save_opt, ncores, bufsize, algo = True, "none", 1024 * 30000, "OLS"
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores, dqflags, avg_dark_current
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores,
)

# Set truth values for PRIMARY results:
Expand Down Expand Up @@ -101,7 +101,7 @@ def test_pix_1():
avg_dark_current = 0.0
save_opt, ncores, bufsize, algo = True, "none", 1024 * 30000, "OLS"
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores, dqflags, avg_dark_current
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores,
)

# Set truth values for PRIMARY results:
Expand Down Expand Up @@ -134,7 +134,7 @@ def test_pix_2():
avg_dark_current = 0.0
save_opt, ncores, bufsize, algo = True, "none", 1024 * 30000, "OLS"
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores, dqflags, avg_dark_current
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores,
)

# Set truth values for PRIMARY results:
Expand Down Expand Up @@ -177,7 +177,7 @@ def test_pix_3():
avg_dark_current = 0.0
save_opt, ncores, bufsize, algo = True, "none", 1024 * 30000, "OLS"
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores, dqflags, avg_dark_current
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores,
)

# Set truth values for PRIMARY results:
Expand Down Expand Up @@ -219,7 +219,7 @@ def test_pix_4():
avg_dark_current = 0.0
save_opt, ncores, bufsize, algo = True, "none", 1024 * 30000, "OLS"
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores, dqflags, avg_dark_current
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores,
)

# Set truth values for PRIMARY results:
Expand Down Expand Up @@ -302,7 +302,7 @@ def test_pix_5():
avg_dark_current = 0.0
save_opt, ncores, bufsize, algo = True, "none", 1024 * 30000, "OLS"
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores, dqflags, avg_dark_current
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores,
)

# XXX see the note above for the differences in C and python testing values.
Expand Down Expand Up @@ -351,7 +351,7 @@ def test_pix_6():
avg_dark_current = 0.0
save_opt, ncores, bufsize, algo = True, "none", 1024 * 30000, "OLS"
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores, dqflags, avg_dark_current
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores,
)

# Set truth values for PRIMARY results:
Expand Down Expand Up @@ -392,7 +392,7 @@ def test_pix_7():
avg_dark_current = 0.0
save_opt, ncores, bufsize, algo = True, "none", 1024 * 30000, "OLS"
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores, dqflags, avg_dark_current
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores,
)

# Set truth values for PRIMARY results:
Expand Down Expand Up @@ -425,7 +425,7 @@ def test_pix_8():
avg_dark_current = 0.0
save_opt, ncores, bufsize, algo = True, "none", 1024 * 30000, "OLS"
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores, dqflags, avg_dark_current
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores,
)

# Set truth values for PRIMARY results:
Expand Down Expand Up @@ -459,7 +459,7 @@ def test_pix_9():
avg_dark_current = 0.0
save_opt, ncores, bufsize, algo = True, "none", 1024 * 30000, "OLS"
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores, dqflags, avg_dark_current
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores,
)

# Set truth values for PRIMARY results:
Expand Down Expand Up @@ -502,7 +502,7 @@ def test_pix_10():
avg_dark_current = 0.0
save_opt, ncores, bufsize, algo = True, "none", 1024 * 30000, "OLS"
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores, dqflags, avg_dark_current
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores,
)

# Set truth values for PRIMARY results:
Expand Down Expand Up @@ -543,7 +543,7 @@ def test_pix_11():
avg_dark_current = 0.0
save_opt, ncores, bufsize, algo = True, "none", 1024 * 30000, "OLS"
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores, dqflags, avg_dark_current
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores,
)

# Set truth values for PRIMARY results:
Expand Down Expand Up @@ -579,7 +579,7 @@ def test_pix_12():
avg_dark_current = 0.0
save_opt, ncores, bufsize, algo = True, "none", 1024 * 30000, "OLS"
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores, dqflags, avg_dark_current
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores,
)

# Set truth values for PRIMARY results for pixel 1:
Expand Down Expand Up @@ -633,7 +633,7 @@ def test_miri_0():
avg_dark_current = 0.0
save_opt, ncores, bufsize, algo = True, "none", 1024 * 30000, "OLS"
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores, dqflags, avg_dark_current
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores,
)

# Set truth values for PRIMARY results:
Expand Down Expand Up @@ -667,7 +667,7 @@ def test_miri_1():
avg_dark_current = 0.0
save_opt, ncores, bufsize, algo = True, "none", 1024 * 30000, "OLS"
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores, dqflags, avg_dark_current
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores,
)

# Set truth values for PRIMARY results:
Expand Down Expand Up @@ -701,7 +701,7 @@ def test_miri_2():
avg_dark_current = 0.0
save_opt, ncores, bufsize, algo = True, "none", 1024 * 30000, "OLS"
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores, dqflags, avg_dark_current
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores,
)

# Set truth values for PRIMARY results:
Expand Down Expand Up @@ -735,7 +735,7 @@ def test_miri_3():
avg_dark_current = 0.0
save_opt, ncores, bufsize, algo = True, "none", 1024 * 30000, "OLS"
slopes, cube, ols_opt, gls_opt = ramp_fit_data(
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores, dqflags, avg_dark_current
ramp_data, bufsize, save_opt, rnoise, gain, algo, "optimal", ncores,
)

# Set truth values for PRIMARY results:
Expand Down
Loading

0 comments on commit 7c11971

Please sign in to comment.