mfouesneau / pyphot

suite to deal with passband photometry
https://mfouesneau.github.io/pyphot/
MIT License
57 stars 18 forks source link

My own set of filters #22

Closed gserrano990 closed 4 years ago

gserrano990 commented 4 years ago

Hi,

How can I include my own set of filters in the pyphot library? I have the transmission profiles. These are for CCD detectors.

Thanks

mfouesneau commented 4 years ago

Are you looking for the following section in the documentation? http://mfouesneau.github.io/docs/pyphot/more_examples.html#defining-your-own-passband

or to register a new filter in the library file or creating a new library?

gserrano990 commented 4 years ago

Hi,

I'd like to create a new library with new filters using their transmission curves.

gserrano990 commented 4 years ago

Or add the new filters to the existing library.

mfouesneau commented 4 years ago

You can make csv files and load them with the Ascii Library class

If you are worried about formatting them properly, you can make pyphot do it for you.

For every filter you want to have, you make a UnitFilter object (linked to the documentation above) and make a library object, and add_filter or add_filters. It will generate the files for you.

If you prefer an hdf5 file at the end (a single file is good to have), there is a to_hdf method.

Let me know if this give you all the info.

mfouesneau commented 4 years ago

I suppose the solution above worked. Re-open the issue if not.