Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build dynamic states from continuity and oflsdir backstop? #130

Closed
jeanconn opened this issue Jun 13, 2019 · 6 comments · Fixed by #131
Closed

How to build dynamic states from continuity and oflsdir backstop? #130

jeanconn opened this issue Jun 13, 2019 · 6 comments · Fixed by #131
Labels

Comments

@jeanconn
Copy link
Contributor

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:

  • continuity initial state
  • continuity states or commands from some time before the last available telemetry
  • (telemetry for thermistor data)
  • backstop cmds

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

sot/starcheck#219

@taldcroft
Copy link
Member

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?

@taldcroft
Copy link
Member

Oops, I see in there reference to a magical method add_comands() that is "not yet implemented". Err. Probably not too hard?

@jeanconn
Copy link
Contributor Author

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.

@taldcroft
Copy link
Member

I have a POC implementation on my laptop. Need to step away for a meeting and other stuff, stand by.

@jeanconn
Copy link
Contributor Author

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).

@taldcroft
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants