Skip to content

Commit

Permalink
Merge pull request #307 from sot/minus_8p8
Browse files Browse the repository at this point in the history
Use -8.8C for planning limit and effective t_ccd determination
  • Loading branch information
jeanconn authored Sep 10, 2019
2 parents 1c9bf88 + 56c6991 commit bb86d78
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions proseco/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def get_effective_t_ccd(t_ccd):
:param t_ccd:
:return:
"""
t_limit = ACA.aca_t_ccd_planning_limit
t_limit = ACA.aca_t_ccd_penalty_limit
if t_ccd > t_limit:
return t_ccd + 1 + (t_ccd - t_limit)
else:
Expand Down Expand Up @@ -224,7 +224,7 @@ def set_attrs_from_kwargs(self, **kwargs):
In this ACATable object:
- t_ccd_eff_{acq,guide} are the effective T_ccd values which are adjusted
if the actual t_ccd{acq,guide} values are above ACA.aca_t_ccd_planning_limit.
if the actual t_ccd{acq,guide} values are above ACA.aca_t_ccd_penalty_limit.
- t_ccd_{acq,guide} are the actual (or predicted) values from the call
The downstream AcqTable, GuideTable, and FidTable are initialized with the
Expand Down
5 changes: 3 additions & 2 deletions proseco/characteristics.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
col_spoiler_mag_diff = 4.5
col_spoiler_pix_sep = 10 # pixels

# ACA T_ccd planning limit (degC)
aca_t_ccd_planning_limit = -9.5
# ACA T_ccd penalty limit (degC).
# Above this limit a temperature "penalty" is applied via get_effective_t_ccd()
aca_t_ccd_penalty_limit = -8.8

# Dark current that corresponds to a 5.0 mag star in a single pixel. Apply
# this value to the region specified by bad_pixels.
Expand Down
8 changes: 4 additions & 4 deletions proseco/tests/test_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,14 +310,14 @@ def test_big_sim_offset():
def test_calling_with_t_ccd_acq_guide(call_t_ccd):
"""Test that calling get_aca_catalog with t_ccd or t_ccd_acq/guide args sets all
CCD attributes correctly in the nominal case of a temperature
below the planning limit.
below the penalty limit.
"""
dark = DARK40.copy()
stars = StarsTable.empty()
stars.add_fake_constellation(mag=8.0, n_stars=8)

t_ccd = np.trunc(ACA.aca_t_ccd_planning_limit - 1.0)
t_ccd = np.trunc(ACA.aca_t_ccd_penalty_limit - 1.0)

if call_t_ccd:
# Call with just t_ccd=t_ccd
Expand Down Expand Up @@ -361,13 +361,13 @@ def test_calling_with_t_ccd_acq_guide(call_t_ccd):
@pytest.mark.parametrize('t_ccd_case', t_ccd_cases)
def test_t_ccd_effective_acq_guide(t_ccd_case):
"""Test setting of effective T_ccd temperatures for cases above and
below the planning limit.
below the penalty limit.
"""
stars = StarsTable.empty()
stars.add_fake_constellation(mag=8.0, n_stars=8)

t_limit = ACA.aca_t_ccd_planning_limit
t_limit = ACA.aca_t_ccd_penalty_limit

t_offset, t_penalty_acq, t_penalty_guide = t_ccd_case
# Set acq and guide temperatures different
Expand Down

0 comments on commit bb86d78

Please sign in to comment.