Skip to content

Commit

Permalink
Adding a comment for possible update of Poisson variance computation …
Browse files Browse the repository at this point in the history
…using the average dark current.
  • Loading branch information
kmacdonald-stsci committed Apr 9, 2024
1 parent 5771276 commit 6068890
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/stcal/ramp_fitting/src/slope_fitter.c
Original file line number Diff line number Diff line change
Expand Up @@ -2591,6 +2591,8 @@ ramp_fit_pixel_integration_fit_slope_seg_len1(
seg->slope = pr->data[idx] / timing;

pden = (timing * pr->gain);
/* XXX PR # 254. Is there a JP ticket for this? */
/* seg->var_p = (pr->median_rate pr->dcurrent) / pden; */
seg->var_p = pr->median_rate / pden + pr->dcurrent;

/* Segment read noise variance */
Expand Down Expand Up @@ -2636,6 +2638,8 @@ ramp_fit_pixel_integration_fit_slope_seg_len2(
/* Segment Poisson variance */
if (pr->median_rate > 0.) {
pden = (rd->group_time * pr->gain);
/* XXX PR # 254. Is there a JP ticket for this? */
/* seg->var_p = (pr->median_rate pr->dcurrent) / pden; */
seg->var_p = pr->median_rate / pden + pr->dcurrent;
} else {
seg->var_p = pr->dcurrent;
Expand Down Expand Up @@ -2797,6 +2801,8 @@ ramp_fit_pixel_integration_fit_slope_seg_default_weighted_seg(
/* Segment Poisson variance */
if (pr->median_rate > 0.) {
pden = (rd->group_time * pr->gain * (seglen - 1.));
/* XXX PR # 254. Is there a JP ticket for this? */
/* seg->var_p = (pr->median_rate pr->dcurrent) / pden; */
seg->var_p = pr->median_rate / pden + pr->dcurrent;
} else {
seg->var_p = pr->dcurrent;
Expand Down

0 comments on commit 6068890

Please sign in to comment.