twodof

Calculate ACIS PSMC temperatures using a two degree-of-freedom model.

Functions

twodof.calc_twodof_model(states, T_pin0, T_dea0, times, par, dt=32.799999999999997)

Calculate the PSMC temperatures 1PDEAAT and 1PIN1AT given the list of configuration states and initial temperatures dea_T0 and pin_T0.

The states input must be an iterable list with the following keys::
tstart tstop power pitch simpos
Parameters:
  • states – iterable list of states (must be contiguous)
  • T_pin0 – initial value (degC) of 1pin1at at states[0][‘tstart’]
  • T_dea0 – initial value (degC) of 1pdeaat at states[0][‘tstart’]
  • times – array of times at which to return the model temperatures
  • par – model parameters dictionary
  • dt – approximate time spacing for calculating model values (secs)
Return type:

predicted temperature arrays (T_pin, T_dea)

twodof.Tf_zero_power(par, pitch, simz)
Settling temperature (Tf) at zero PSMC power. The corresponds to the T0 parameter of the two-mass model.
twodof.calc_state_temps(state, par, t, Ti, eigvals, eigvecs, eigvecinvs, U01, C1, C2)

Calculate predicted temperatures at the input times for a given state using the two-mass model.

Evaluate the following but do so in a vectorized form:

exp_l1_t = math.exp(l1*t)
exp_l2_t = math.exp(l2*t)
T1 = np.matrix([[(exp_l1_t-1)/l1, 0 ],
                [0, (exp_l2_t-1)/l2]]) * self.eigvecinvs * self.heat
T2 = np.matrix([[exp_l1_t, 0  ],
                [0,  exp_l2_t]]) * self.eigvecinvs * self.Ti
return self.eigvecs * (T1 + T2)
Parameters:
  • state – state vector (with power, pitch, simpos)
  • par – model parameter values
  • t – numpy array of input times (sec)
  • Ti – Vector of initial temperatures (1pin1at and 1pdeaat)
Return type:

numpy array of temperatures at times C{t}

Classes

class twodof.TwoDOF(states, T_pin0, T_dea0, dt=32.799999999999997)

Bases: object

calc_model(t, par, msid='1pdeaat')
Parameters:
  • t – array of times at which to return the model temperatures
  • par – model parameters
  • msid – desired MSID (‘1pin1at’ or ‘1pdeaat’)
Return type:

array of temperatures for C{msid}

interpolate_msid_temp(msid, t)
Return predicted temperatures in degC for msid at times t.

Table Of Contents

Previous topic

psmc_check