Compare commits

...

6 commits

Author SHA1 Message Date
Stephan I. Böttcher
105a44f7c3 hetept l1l2: patch 9.2 to master
incorporate the EPT L2 trigger changes from 9.2 into the main table.
2024-02-26 13:25:30 +01:00
Stephan I. Böttcher
9d922f2e7c hetept ppss: patch 3 opheater changes
incorporate the op heater changes from patch 9.3 into the main config
2024-02-26 13:19:56 +01:00
Stephan I. Böttcher
df6eb79650 Merge branch 'hetept_v9_patches' 2024-02-26 12:30:08 +01:00
Stephan I. Böttcher
65c120725a hetept_config_opheater_patch4: add .revert() 2022-01-25 23:39:25 +01:00
Stephan I. Böttcher
a4b68dec65 patch: .revert() 2022-01-25 23:38:08 +01:00
Stephan I. Böttcher
c01ddc1a09 hetept_config_opheater_patch4: T_he2=-1°C, DC_ESTIMATE=60%, DCMAX=70% 2022-01-25 23:09:49 +01:00
14 changed files with 72 additions and 42 deletions

View file

@ -1,5 +1,5 @@
msg(0x000f, 3, 0x0000093500090004)
msg(0x268c, 3, 0x0000af1f0000c002)
msg(0x268d, 3, 0x007270e009f99000)
msg(0x268d, 3, 0x007270e00a0c8600)
msg(0x2697, 1, 0x00000000000000ff)
msg(0x2696, 3, 0x0003e8010000413c)

View file

@ -3,6 +3,6 @@
<parameter name="SensorID" id="PID00069">2</parameter>
<parameter name="Flags" id="PID00085">15</parameter>
<parameter name="NMessages" id="PID00086">5</parameter>
<parameter name="Messages" id="PID00075">c00f0000093500090004e68c0000af1f0000c002e68d007270e009f99000669700ffe6960003e8010000413c</parameter>
<parameter name="Messages" id="PID00075">c00f0000093500090004e68c0000af1f0000c002e68d007270e00a0c8600669700ffe6960003e8010000413c</parameter>
</TC>
</TCs>

View file

@ -0,0 +1,4 @@
msg(0x268c, 3, 0x0000af1f0000c002)
msg(0x268d, 3, 0x007270e00f78ff00)
msg(0x2697, 1, 0x00000000000000ff)
msg(0x2696, 3, 0x0003e8010000413c)

View file

@ -0,0 +1,8 @@
<TCs>
<TC type="128" subtype="102" id="ZID52540" comment="" delta="00:00:01">
<parameter name="SensorID" id="PID00069">2</parameter>
<parameter name="Flags" id="PID00085">15</parameter>
<parameter name="NMessages" id="PID00086">4</parameter>
<parameter name="Messages" id="PID00075">e68c0000af1f0000c002e68d007270e00f78ff00669700ffe6960003e8010000413c</parameter>
</TC>
</TCs>

View file

@ -8,10 +8,11 @@ class hetept94(patch):
if self.config is None:
raise ValueError("Please provide a config=")
self.scratch(subversion=4)
self.ppss_oh = self.config.ppss.find_flags("OPHEATER")[0]
OH_DC_ESTIMATE = 70
OH_DC_ESTIMATE = 60
OH_SHIFT = 0
OH_DCMAX = 75
OH_DCMAX = 70
def send(self, msg):
self.send_scratch(msg)
@ -23,14 +24,20 @@ class hetept94(patch):
shift = self.OH_SHIFT )
self.send_ping(msg)
def revert(self, msg):
self.ppss_oh(msg)
self.send_ping(msg)
def main(self, fmts=["xml", "msg"]):
for fmt in fmts:
fn = "hetept%s_v0009_patch4.%s" % (self.config.unit[-1], fmt)
self.emit(f=fn, fmt=fmt)
fn = "hetept%s_v0009_revert4.%s" % (self.config.unit[-1], fmt)
self.emit(f=fn, fmt=fmt, revert=True)
import solo.hetept.config
patch1 = hetept94(name="fm1", T=-6.0, config=solo.hetept.config.fm1(config_page=0x10000, patch=3))
patch2 = hetept94(name="fm2", T=-0.5, config=solo.hetept.config.fm2(config_page=0x10000, patch=3))
patch2 = hetept94(name="fm2", T=-1.0, config=solo.hetept.config.fm2(config_page=0x10000, patch=3))
def main():
patch1.main()

View file

@ -1,5 +1,5 @@
msg(0x000f, 3, 0x0000093500090004)
msg(0x268c, 3, 0x0000af1f0000c002)
msg(0x268d, 3, 0x007270e008ed9000)
msg(0x268d, 3, 0x007270e009188600)
msg(0x2697, 1, 0x00000000000000ff)
msg(0x2696, 3, 0x0003e8010000413c)

View file

@ -3,6 +3,6 @@
<parameter name="SensorID" id="PID00069">3</parameter>
<parameter name="Flags" id="PID00085">15</parameter>
<parameter name="NMessages" id="PID00086">5</parameter>
<parameter name="Messages" id="PID00075">c00f0000093500090004e68c0000af1f0000c002e68d007270e008ed9000669700ffe6960003e8010000413c</parameter>
<parameter name="Messages" id="PID00075">c00f0000093500090004e68c0000af1f0000c002e68d007270e009188600669700ffe6960003e8010000413c</parameter>
</TC>
</TCs>

View file

@ -0,0 +1,4 @@
msg(0x268c, 3, 0x0000af1f0000c002)
msg(0x268d, 3, 0x007270e00f78ff00)
msg(0x2697, 1, 0x00000000000000ff)
msg(0x2696, 3, 0x0003e8010000413c)

View file

@ -0,0 +1,8 @@
<TCs>
<TC type="128" subtype="102" id="ZID52540" comment="" delta="00:00:01">
<parameter name="SensorID" id="PID00069">3</parameter>
<parameter name="Flags" id="PID00085">15</parameter>
<parameter name="NMessages" id="PID00086">4</parameter>
<parameter name="Messages" id="PID00075">e68c0000af1f0000c002e68d007270e00f78ff00669700ffe6960003e8010000413c</parameter>
</TC>
</TCs>

View file

@ -12,7 +12,7 @@ class hetept_config(unit_config):
TYPE = "HETEPT"
def __init__(self, ppss=None, l3=None, ana=None, science=None, dps=None,
unit='HET/EPT1', model=None, variant=None, temperature=25, env=None,
patch=0, verbose=1, dp_flag=0, version=0, **kwargs):
patch=0, verbose=1, dp_flag=0, version=0, OH_degC=-10, **kwargs):
from .ppss import hetept_ppss
from .dps import hetept_dps
from .l3trigger import hetept_l3_trigger
@ -37,10 +37,8 @@ class hetept_config(unit_config):
l3 = dps.l3
if ana is None:
ana = hetept_l1l2(calib=l3.scales())
if version==9 and patch>=2:
ana.patch92()
ppss = hetept_ppss(ana=ana, dps=dps, dps_us=110000, clear_us=820000, verbose=verbose)
ppss = hetept_ppss(ana=ana, dps=dps, dps_us=110000, clear_us=820000, OH_degC=OH_degC, verbose=verbose)
self.ppss = ppss
self.dps = self.ppss.dps
self.l3 = self.dps.l3

View file

@ -84,7 +84,7 @@ def pqm(calib=False, anatest=False, **kwargs):
calib_ppss=calib_ppss, **kwargs)
return table
def fm1(start_modulus=3600, streamtest=False, **kwargs):
def fm1(start_modulus=3600, streamtest=False, OH_degC=-6.0, **kwargs):
UNIT="HET/EPT1"
MODEL="FM1"
UNIT_ID = 0xF1
@ -96,7 +96,7 @@ def fm1(start_modulus=3600, streamtest=False, **kwargs):
streamtest=streamtest, **kwargs )
return table
def fm2(start_modulus=3600, streamtest=False, **kwargs):
def fm2(start_modulus=3600, streamtest=False, OH_degC=-1.0, **kwargs):
UNIT="HET/EPT2"
MODEL="FM2"
UNIT_ID = 0xF2

View file

@ -71,12 +71,12 @@ class hetept_l1l2(heteptana):
self.set_thres(self.HET+self.EPT, idx=idx)
def set_default_thresholds(self, idx="low"):
def set_default_thresholds(self, idx="low", ept_A_thr=1000):
self.set_thres(self.EPT_C, 45*keV, idx="high")
self.set_thres(self.EPT_C, 25*keV, idx="low")
# EPT_A threshold must be above all x-talk
self.set_thres(self.EPT_A, 60*keV)
self.set_thres(self.EPT_A, ept_A_thr*keV)
AH = [a for a in self.HET_A1+self.HET_A2 if a[-1]=='H']
AL = [a for a in self.HET_A1+self.HET_A2 if a[-1]=='L']
@ -113,12 +113,12 @@ class hetept_l1l2(heteptana):
self.l2[3].disable()
# EPT
self.l1bits(0, "C1", "C2")
self.l1bits(0, "C1", "C2", "A1", "A2")
self.l1bits(2, "C3", "C4", "A3", "A4")
self.l1bits(1, "A1", "A2")
self.l1bits(2, "C3", "C4")
self.l1bits(3, "A3", "A4")
self.l2[0].set(any=(0,), none=(1,), mask=self.ch("C1", "A1", "C2", "A2"))
self.l2[1].set(any=(2,), none=(3,), mask=self.ch("C3", "A3", "C4", "A4"))
self.l2[0].set(any=(0,), mask=self.ch("C1", "A1", "C2", "A2"))
self.l2[1].set(any=(2,), mask=self.ch("C3", "A3", "C4", "A4"))
a1 = 6; A1 = self.HET_A1
b1 = 7; B1 = self.HET_B1
@ -145,13 +145,6 @@ class hetept_l1l2(heteptana):
self.l2[6].set(any=(a2,b2i), none=(a1,b1), mask=self.ch( B1+C+B2+A2), cls=2)
self.l2[7].set(any=(a2,b2i,b1i), mask=self.ch(A1+B1+C+B2+A2), cls=3)
def patch92(self, ept_A_thr=1000):
self.l1bits(0, "C1", "C2", "A1", "A2")
self.l1bits(2, "C3", "C4", "A3", "A4")
self.l2[0].set(none=())
self.l2[1].set(none=())
self.set_thres(self.EPT_A, ept_A_thr*keV)
def fix_sparse_mask(self):
"read all channels following with the first one selected"
for l2 in self.l2:

View file

@ -22,16 +22,18 @@ class hetept_ppss(ppss_table):
HK_SLOW_cadence = 3600
DRIBBLE_cadence = 3600
TEMP_IDX = 4
OH_SETPOINT_C = -50
OH_SETPOINT = HK_T_to_ADC(OH_SETPOINT_C)
OH_DC_ESTIMATE = 60
OH_SHIFT = 0
OH_DCMAX = 70
def __init__(self, ana, dps=None, dps_us=100000, clear_us=810000, verbose=1):
def __init__(self, ana, dps=None, dps_us=100000, clear_us=810000, OH_degC=-50, verbose=1):
ppss_table.__init__(self, verbose=verbose)
self.ana = ana
self.dps = dps
self.dps_us = dps_us
self.clear_us = clear_us
self.OH_SETPOINT = HK_T_to_ADC(OH_degC, dc_estimate=self.OH_DC_ESTIMATE, shift=self.OH_SHIFT)
self.assemble()
def assemble(self):
@ -109,7 +111,10 @@ class hetept_ppss(ppss_table):
self.add(ppss_item( 170, ppss_modulus(self.HK_ANA_cadence, 0), read_ana(tag=self.TAG_HK, counter=2, HK=1, clock=1)), search=True, HK=True, ANA=True) # ANA counters and temperatures
# set op-heater
self.add(ppss_item( 175, ppss_modulus( 60, 0), opheater(setpoint=self.OH_SETPOINT)), search=True, OPHEATER=True)
self.add(ppss_item( 175, ppss_modulus( 60, 0), opheater(setpoint=self.OH_SETPOINT,
dcmax=self.OH_DCMAX *192//100,
shift = self.OH_SHIFT )
), search=True, OPHEATER=True)
# ICU HK packet parameters, L3 trigger classes, msgs received
self.add(ppss_item( 4, ppss_modulus( 60, 2), read_counters(tag=0x27, a=0x36, n=4, wsize=1)), search=True, ICU=0x27)

View file

@ -10,33 +10,36 @@ class patch:
self.name=name
self.assemble(**aa)
def __call__(self, msg):
self.send(msg)
def __call__(self, msg, revert=False, **aa):
if revert:
self.revert(msg, **aa)
else:
self.send(msg, **aa)
def xml(self, f=sys.stdout):
def xml(self, f=sys.stdout, **aa):
import solo.cdpu.telecom
msg = solo.cdpu.telecom.msg_telecommands()
self(msg)
self(msg, **aa)
f.write("<TCs>\n")
f.write("\n".join([x.xml() for x in msg.tc(unit=self.config.unit)])+"\n")
f.write("</TCs>\n")
def hex(self, f=sys.stdout):
self(solo.solomsgclass.msg_hexdump(f))
self(solo.solomsgclass.msg_hexdump(f), **aa)
def msgs(self, f=sys.stdout):
self(solo.solomsgclass.msg_print(f))
def msgs(self, f=sys.stdout, **aa):
self(solo.solomsgclass.msg_print(f), **aa)
def emit(self, f=sys.stdout, fmt="print"):
def emit(self, f=sys.stdout, fmt="print", **aa):
if isinstance(f, str):
with open(f, "w") as ff:
self.emit(ff, fmt)
self.emit(ff, fmt, **aa)
elif fmt=="hex":
self.hex(f)
self.hex(f, **aa)
elif fmt=="xml":
self.xml(f)
self.xml(f, **aa)
else:
self.msgs(f)
self.msgs(f, **aa)
def main(self):
fmt = sys.argv[1:]