Closed monodera closed 4 years ago
Hi,
Great to know that ZAP works for another instrument!
I also think that it would be nice to have options to specify which extension (and axis configuration) ZAP should look at rather than coding instrument-by-instrument basis.
Yes I agree that having an option to specify the extension would it be useful. For KCWI I went the easy way and just added the special case on INSTRUMEN, which is also interesting because then you don't have to specify the extension number. So, I would be happy to integrate your commit adding FOCAS with the INSTRUMEN check (please make a pull request with this commit), and you or someone else wants to have a more flexible way to select the extension I will be happy to review. I'm no more working on MUSE so I cannot spend too much time on this.
About your bug with writevarcurve
, ZAP used to use "segments", dividing the wavelength axis in smaller pieces to optimize the processing. I changed this to use only one segment by default (though it is still possible to use more if needed), but with hard coded values of (0, 10'000) Angstroms, which is not very clever... What is the wavelength coverage of your data ? The log above suggest that something happens with this (Calculating SVD on 2 segments ([[ 0 3561] [3561 3781]])
).
And then, maybe I did not test well enough writevarcurve
with more than one segment.
Thanks a lot for the reply. I made a pull request with the commit.
The wavelength coverage of my data cube is 5600A to 10980A, extending outside of 10000A limit (is this the reason?).
As shown in the web site (https://www.naoj.org/Observing/Instruments/FOCAS/ifu/), the wavelength coverage depends on the choice of grism and filter configuration.
Ok, so yes this is the reason. You can modify the SKYSEG
to check, and we should set it to something higher by default. This is not ideal but as I explain it is because historically zap was using these segments (this is in the paper), and when I switched to one segment I wanted to preserve this possibility, just in case someone wants to play with it.
I removed the hard-coded limits, without any additional change since the code can actually deal with it directly and will use the wavelength limits from the data. Please check that it works for you, thanks.
Thanks for the modification. ZAP runs successfully to produce the explained variance curve. Because of the different segmentation, there are some differences about an order of <~10%. Is this expected?
The varcurve looks as attached (x is the row index and the y is numbers stored in the table). Does this look reasonable?
Yes I would expect some differences but mostly for the second segment ([3561 3781]
) since it was small and in my experience from MUSE it was giving much better results with only one segment.
The varcurve looks reasonable, I guess zap chose to use something like 4 or 5 eigenvalues ? That's not a lot but it depends on your type of data, it's probably enough to explain the sky components in your case.
There is an IFU mode for FOCAS at Subaru Telescope (https://www2.nao.ac.jp/~shinobuozaki/focasifu/) and I wanted to use ZAP for data taken with it. I've just copied and pasted the code blocks for KCWI so that ZAP runs for my FOCAS IFU data. The current FOCAS IFU pipeline () produces a FITS file with the hdu[0] for the cube data.
The modification I made (https://github.com/musevlt/zap/commit/9d7c596cb15648c278ed1b88f971615b770589db) apparently works nicely with my science cubes (though I haven't done extensive test).
However, it failed to produce the explained variance curves with the following error message. Do you have any ideas how to fix it?
I also think that it would be nice to have options to specify which extension (and axis configuration) ZAP should look at rather than coding instrument-by-instrument basis.