vterron / lemon

Differential photometry for humans (and astronomers)
64 stars 21 forks source link

SDSS Filters unsupported #90

Closed cdilga closed 8 years ago

cdilga commented 8 years ago

The zprime or z' filter is part of a set of filters, u', g', r', i', z'

This is a real filter and, as per the error string I'm opening an issue. Also, I can't find any clear indication of what a .lemonrc file should look like.

cdilga@RED-GOD-UBUNTU:/media/cdilga/Data1/Documents/Astro/Cyg Local/Observations/Reduced$ lemon photometry mosaic.fits lemon-output/*.fits phot.LEMONdB
>> Examining the headers of the 80 FITS files given as input...
>> 10%[=======>                                                                ]Traceback (most recent call last):
  File "/home/cdilga/lemon/lemon", line 135, in <module>
    module.main(args)
  File "/home/cdilga/lemon/photometry.py", line 688, in main
    pfilter = img.pfilter(options.filterk)
  File "/home/cdilga/lemon/fitsimage.py", line 511, in pfilter
    raise passband.NonRecognizedPassband(pfilter_str, **kwargs)
passband.NonRecognizedPassband: cannot identify the photometric system of filter 'zprime' (FITS image = 'lemon-output/hip 98298_1162156_zprime_004a.fits', keyword = 'FILTER'). If this is a legitimate filter name, and you think LEMON should be able to recognize it, please let us know at [http://github.com/vterron/lemon/issues]. In the meantime, you can define your own filters in the /home/cdilga/.lemonrc file, as options of the [custom_filters] section
javierblasco commented 8 years ago

Hi cdilga, Unfortunately, there is an almost infinite number of ways of writing every single valid filter. In this case, as you mention, the filters can be named 'SDSS' or with the symbol ' (prima). LEMON recognizes, for example: "SDSS z", "Sloan z" or "z' " to be the same filter, Sloan´s z. Unfortunately, "zprime" is not supported at the moment and linked to Sloans filters.

Two solutions come to mind while vterron decides if adding another definition for the SDSS filters is the way to go:

1) You could change your headers from zprime to SDSS z, for example. 2) You could add it as a custom filter into the /home/cdilga/.lemonrc file.

I have myself fought quite a bit for my routines to be able to identify every single way of calling the Gunn r filter, it gets very tricky to catch every single way one could write it.

cdilga commented 8 years ago

Cheers, for other's reference adding the following to a new file ~/.lemonrc

[custom_filters]
zprime = Z
uprime = U
gprime = G
rprime = R
iprime = I
vterron commented 8 years ago

Done in 6e80274. Your filters should now work without the need of a /.lemonrc file. Thanks @javierblasco for taking care of this during my absence!