Bases: object
Calculate the starting temperature vectors for the ensemble of pitch profiles at the given start time. Creates sim_inputs[][‘dwell1_T0s’] values.
Calculate initial dwell temperatures.
Parameters: |
|
---|
These are the initial dwell model runs that are used to generate the traditional pyger plots (in conjunction with find_limit_crossings function).
Allowed duration is calculated by a separate function “find_limit_crossings”. This function is run at the end of calc_dwells1, however since full dwell data is also saved, one can recalculate allowed dwell time (initial dwell) for different limit sets.
Calculate model temperature at “non-hot” pitch ranges, starting at hot conditions
Parameters: |
|
---|---|
Returns: | Numpy recarray containing cooldown simulation information |
Regarding pitch values used: 1) By default pitch values previously used are re-used as the sample set for the cooldown
dwells. This makes dividing up the hot vs. cold pitch values much easier. Dividing up the pitch values between hot and “not hot” (i.e. cold) pitch values reduces the number of model runs since there is no need to run a “cooldown” dwell for at hot pitch value. If new pitch values were used, the current constraint profile would have to be mapped in some fashion, complicating the process of finding the required balance of hot and cold time. Also, it doesn’t make sense to run a cooldown dwell for an already cold dwell.
This second set of dwells is sometimes referred to “cooldown” dwells or sims since the original intent was to determine the time to cool from hot conditions.
Regarding time span of second set of dwells (“cooldown dwells”): Cooldown dwells are run from “start” to “stop”; both are inputs to this function. The total cooling time (defined in start, stop, times) should be equal to or longer than the maximum dwell time used in the initial dwell so cooling times are adequately mapped.
Regarding filtering: Dwells that have zero duration (as specifed in the self.dwells1 datastructure) are filtered out. These will likely have final temperatures that are higher than the specified limit.
Determine which dwells reach specified MSID limits.
Parameters: | limits – dict of limits, keys are msids |
---|
This function modifies the dwells1 datastructure by filling in constraint information
Select the initial hot pitch sims that start with a low temperature (bottom 20%)
Parameters: |
|
---|---|
Returns: | index into self.dwells1 datastructure |
This returns the index into the self.dwells1 datastructure, indicating which of those sims that reached a limit, started at the specified percentile/fraction of coldest starting temperatures for the MSID indicated.
Note about the data returned: Invariably, most of these will sims will have startedwithin a narrow pitch range before “maneuvering” to the simulated “hot” pitch. This isimportant to keep in mind since these lowest temperatures will often not be able to be reached during the second dwell set of simulations (think of these as the “cooldown” simulations). This is the purpose of adding a pad to the “cooled” value when calculating cooldown times.
Do basic configuration for the logging system. Similar to logging.basicConfig but the logger name is configurable and both a file output and a stream output can be created. Returns a logger object.
The default behaviour is to create a StreamHandler which writes to sys.stdout, set a formatter using the “%(message)s” format string, and add the handler to the name logger.
A number of optional keyword arguments may be specified, which can alter the default behaviour.
Parameters: |
|
---|---|
Returns: | logging.Logger object |
Generate a set of simulation profiles from which starting conditions can be calculated.
Gather the state and telemetry data required to propagate simulation starting values
Parameters: | model – Dictionary of model information from “constraint_models” |
---|
This gathers the state and telemetry data for one model for N dwells, where N is the number of suitable dwells found in telemetry in the specified time span (usually most recent year of data).
Generate a list of simulation start and stop times
Simulation stop times are generated by finding all dwells with minimum durations specified by “min_dwell_sec”. A minimum dwell time is specified to filter out intermediate states during maneuvers. A default value of 1Ks is used since this is the smallest dwell mission planning will generally schedule.
Simulation start times are calculated by subtracting “n_days” in seconds from the simulation stop times.
These start and stop times are used to propagate starting temperatures for the desired date in the pyger simulation (not calculated in sim_inputs() ).
sim_start_times and sim_stop_times are lists of time values in units of seconds
Fetch states for the specified values.
Parameters: | state_vals – List of state types to query |
---|
Pitch is used as a default in the case where this function is called without a state value.
An extra day before the start time and an extra hour after the stop time are fetched to prevent missing data problems.
Fetch telemetry for the specified msids.
Parameters: | msids – List of msids to fetch |
---|
An extra day before the start time and an extra hour after the stop time are fetched to prevent missing data problems.
Generate a set of simulation profiles from which starting conditions can be calculated.
Parameters: |
|
---|
Generates a dictionary, “sim_inputs” of simulation profiles for each model in the following form:
>>> sim_inputs
Returns a dictionary of simulation profiles for each model (too long to show).
>>> sim_inputs[modelname]
Returns a list of simulation profiles (too long to show). "modelname" is the name of the
model queried.
>>> sim_inputs[modelname][sim_number]
{'msids', 'states', 'T0s', 'tstart', 'T1s' 'tstop'}
Calculate Chandra dwell times given thermal constraints
Bases: pyger.base.ConstraintModel
Bases: pyger.base.ConstraintModel
Bases: pyger.base.ConstraintModel
Bases: pyger.base.ConstraintModel
Bases: pyger.base.ConstraintModel
Bases: pyger.base.ConstraintModel
Bases: pyger.base.ConstraintModel
Bases: pyger.base.ConstraintModel
Calculate allowed dwell times coming out of perigee given a set of constraint models.
Parameters: |
|
---|---|
Returns: | dict of computed constraint model objects |
Calculate allowed dwell times coming out of perigee given a set of constraint models.
Parameters: |
|
---|---|
Returns: | dict of computed constraint model objects |
Calculate relevant statistics for “cooldown” dwell simulations.
Parameters: | dwell2_case – This is a Numpy recarray representing the output of calc_constraints2() for a single MSID. If running calc_constraints2() for multiple MSIDs, run calc_dwell2_stats() for each MSID individually. |
---|---|
Returns: | Numpy recarray of relevant statistical data |
Calculate relevant statistics for hot dwells used to seed cooldown simulations.
Parameters: | dwell2_case – This is a Numpy recarray representing the output of calc_constraints2() for a single MSID. If running calc_constraints2() for multiple MSIDs, run calc_dwell2_stats() for each MSID individually. |
---|---|
Returns: | Numpy recarray of relevant statistical data |
Although the hot dwell data was already calculated and is present in the dwells1 datastructure, the full hot dwell durations are not 100% comparable to the cooldown dwells due to the cooldown temperature ratio (T_cool_ratio) used to determine when a cooldown dwell has reached “close enough” to the original starting temperature. The comparable hot dwell time has a portion of the initial dwell time “clipped” from the total duration. The amount of time clipped is equal to the amount of time it would take to reach the “close enough” cooldown temperature during the hot dwell starting at the dwell1 T0.
Load pyger data from pickle file back into object compatible with pyger plotting methods
Parameters: | filename – File name of pickled output from calc_constraints() |
---|
This is only meant to be used to read in the initial constraints object produced by calc_constraints(), not the cooldown data produced by calc_constraints2(). The data prduced by calc_constraints2() should be able to be read in with a simple pickle.load() function.
Merge the dwells in the constraints list, finding the shortest from among the constraints. :param constraints: list of ModelConstraint objects :returns: NumPy recarray of dwells with pitch, duration, constraint_name columns
Save pyger data to pickle file
Parameters: |
|
---|