cxcsds / ciao-contrib

Extra scripts and code to enhance the capabilities of CIAO.
GNU General Public License v3.0
8 stars 6 forks source link

q: can I get the redirected value of a parameter? #871

Closed kglotfelty closed 5 months ago

kglotfelty commented 5 months ago

If I

from ciao_contrib.runtool import make_tool
ape = make_tool("acis_process_events")
print(ape.eventdef)

I get

)stdevt1

Is there a nice way to get the actual value, ie '{d:time,l:expno,s:ccd_id...}' instead of the redirect or do I have to parse the value looking for .startswith(')')

nplee commented 5 months ago

I don't think so from when I looked into it in the past.

From an unused function, but I have it in place should the blanksky files ever get CTI/gain updates to do this in:

https://github.com/cxcsds/ciao-contrib/blob/de8e6c146c2741d023ecd205ad63595fcae483f7/bin/blanksky#L361-L388

DougBurke commented 5 months ago

I'd have to look through the code, but I think I got to this point and punted on the definition of "what a value is" (is it the value, is it the redirect, is it both ...).