-
Notifications
You must be signed in to change notification settings - Fork 4
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
micado.flatlamp()
not accepting parameters
#123
Comments
I think it's not the decorator but rather the wrapper ( Cannot try it right now but this might fix it: @add_function_call_str
def flatlamp(*args, **kwargs):
return _flatlamp(*args, **kwargs) Actually it should have been written like this in the first place to allow any arguments to pass through. I'm not sure why we have these re-definitions there anyway... |
The point of those wrappers was to make parameterless functions, to be used as e.g. the TARGET of an exposure. That is, to put that in the FITS TARGET fits header etc. So it would mimic an actual observation. It should be parameterless because if it would be an actual astronomical source, then those do not have parameters either. Making it parameterless also makes it easier to do a round trip: run the simulation directly from the FITS headers (e.g. for reproducibility, or when connecting ScopeSim to the ICS, or maybe when replicating a true observation): just import the function, no need to parse parameters from the FITS header. That was the idea at least, but I guess this is not used at all anymore. So feel free to butcher it. The flatlamp is perhaps a bad example, because as you realized with METIS, it should just be described in the IRDB and not in ScopeSim_Templates. |
The goal of the Then at some point Kieran changed the keyword to FNSRC0 IIRC, something non-HIERARCH anyway, so that the CONTINUE keyword could be used, making that argument less relevant. And then, since this week, astropy supports HIERARCH+CONTINUE, see astropy/astropy#17748 , so we could now switch back to using the original HIERARCH SIM keyword to store the source. |
See #124 and AstarVienna/irdb#209. |
This must have something to do with the decorator in
micado/__init__.py
:as
simtp.micado._flatlamp(fraction=1)
works!The text was updated successfully, but these errors were encountered: