Closed jeanconn closed 5 years ago
Ihink this is addressed in the Note in this section:
http://cxc.cfa.harvard.edu/mta/ASPECT/tool_doc/kadi/commands_states.html#states-from-commands
Does that do it?
Oops, I see in there reference to a magical method add_comands()
that is "not yet implemented". Err. Probably not too hard?
Yes, I was just writing that back. I had forgotten that part of the docs (so that was helpful) and if we still need to implement that command to make that work, that looks like the way to go forward! Probably not too hard as you say.
I have a POC implementation on my laptop. Need to step away for a meeting and other stuff, stand by.
OK. I was back on yoshi work. I figured that it would be good to keep the ball moving on starcheck improvements, but the eclipses overall are a small effect (which is why this didn't bump up to a high priority issue earlier).
For the record, this might work:
def add_bs_to_cmds(cmds, bs):
n_bs = len(bs)
out = CommandTable()
out['idx'] = np.zeros(n_bs, dtype=np.uint16)
out['date'] = np.chararray.encode(bs['date'])
out['type'] = np.chararray.encode(bs['type'])
out['tlmsid'] = np.chararray.encode(bs['tlmsid'])
out['scs'] = bs['scs']
out['step'] = bs['step']
out['timeline_id'] = 0
out['vcdu'] = bs['vcdu']
out['params'] = bs['params']
cmds_plus_bs = vstack([cmds, out])
cmds_plus_bs.sort(['date', 'step', 'scs'])
return cmds_plus_bs
What is the recommended path to work from dynamic states to run thermal models?
I assume that we want something similar to the cmd_states approach where we get:
And then from the initial state and the commands from the commands table and the commands in the under-evaluation backstop we make states. I just don't immediately see how to extract commands from the backstop in products and combine those with the commands from kadi.commands.commands.get_cmds and feed everything to kadi.commands.get_states .
Specifically I was wondering about moving starcheck to dynamic states as part of the fix for
https://github.com/sot/starcheck/issues/219