foxsi / foxsi-smex

Tools for scientists to investigate the capabilities of FOXSI
MIT License
2 stars 8 forks source link

Fixes broken `foxsi_get_output_image_cube` #24

Closed ayshih closed 8 years ago

ayshih commented 8 years ago

Fixes #22

foxsi_get_output_image_cube now calls foxsi_get_output_2d_image (as it should) to avoid unnecessary code duplication.

aringlis commented 8 years ago

When I test this on the default input cube, for some reason the first and last output maps (0 and 29) have data all zero.

ayshih commented 8 years ago

Hmm, that's because the effective areas for those two energy bins are 5e-11 and 0, respectively. If you turn off the addition of Poisson noise (i.e., /no_count_stats), you can see that the first map has some ridiculously small numbers of expected counts.

LinErinG commented 8 years ago

Yes, there's effectively no area in the lowest bin of the default cube (it's ~1-3 keV). There's a tiny bit of EA for the uppermost bin (58-60) but it's effectively zero.

LinErinG commented 8 years ago

I tested out the pull request and it looks good to me.

ayshih commented 8 years ago

I've changed the default image cube to have energy binning from 2 to 60 keV in exact steps of 2 keV. I also fixed a bug where the logical units for opening files weren't being freed.

aringlis commented 8 years ago

Looks good :+1: