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

Add option to bypass any resolution-convolved calculations #66

Closed
dkirkby opened this issue May 3, 2017 · 4 comments
Closed

Add option to bypass any resolution-convolved calculations #66

dkirkby opened this issue May 3, 2017 · 4 comments

Comments

@dkirkby
Copy link
Member

dkirkby commented May 3, 2017

This could be useful when specsim is calculating photons input to a 2D sensor simulation, i.e., specsim handles the atmosphere model and fiberloss calculations, and provides high resolution arrays of source and sky photons entering the instrument. Specifically, this mode would only provide the simulated output table and not the per-camera output tables (see here for details).

This should reduce the memory footprint and run time, which (I suspect) are both dominated by the per-camera resolution matrix and convolutions. This mode would be selected with an optional arg to the Simulator ctor, e.g.

desi = specsim.simulator.Simulator('desi', num_fibers=5000, camera_output=False)
@dkirkby
Copy link
Member Author

dkirkby commented May 4, 2017

@sbailey writes that in addition to the Simulator.simulated table, he needs:

  • Simulator.camera_names
  • Simulator.camera_output[i]['wavelength']

I need to check on these...

@sbailey
Copy link
Contributor

sbailey commented May 4, 2017

Simulator.camera_names : it would be handy to retain this, but I don't mind hardcoding around it if needed. I suspect the same information is also available via the Configuration object (pointers welcome). I'm just being careful in using Simulator.camera_names[i] in parallel with Simulator.camera_output[i] in case the order every changes from ['b', 'r', 'z'].

Simulator.camera_output[i]['wavelength'] I only use the first and last elements to get the wavelength ranges that are valid for the Simulator.simulated['num_source_electrons_*'] per-camera columns. If the min/max wavelength ranges for each camera are kept elsewhere within the Simulator or Configuration object I could grab from there instead. I could also get the ranges via desimodel if needed.

@dkirkby
Copy link
Member Author

dkirkby commented May 8, 2017

I'm just being careful in using Simulator.camera_names[i] in parallel with
Simulator.camera_output[i] in case the order every changes from ['b', 'r', 'z'].

Everywhere cameras are listed, they are always in order of increasing effective wavelength.

@dkirkby
Copy link
Member Author

dkirkby commented May 8, 2017

I only use the first and last elements to get the wavelength ranges that are valid for the
Simulator.simulated['num_source_electrons_*'] per-camera columns

I suspect the per-camera wavelength_min/max attributes will do the job here. The Camera objects are still accessible via the list simulator.instrument.cameras in this new mode.

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

No branches or pull requests

2 participants