Skip to content

Implement SVOFilter type, make statistics generic #22

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ This package provides access to, and operations on, photometric filter curves. S

## Types

We use the [`PhotometricFilter`](@ref) type to represent photometric filters in this package.
All photometric filter types should be subtypes of the [`AbstractFilter`](@ref PhotometricFilters.AbstractFilter) type. We define a minimal API that should be followed so that new types can make use of the generic filter operations we define.

The simplest concrete filter type we provide to represent photometric filters is [`PhotometricFilter`](@ref).

```@docs
PhotometricFilter
Expand All @@ -31,10 +33,11 @@ using PhotometricFilters: SDSS_u, SDSS_g, SDSS_r, SDSS_i, SDSS_z, fwhm
filts = [SDSS_u(), SDSS_g(), SDSS_r(), SDSS_i(), SDSS_z()]
```

**NOTE THAT THESE INCLUDED FILTER CURVES ARE NOT GUARANTEED TO BE UP-TO-DATE.** If you are using a filter/instrument that may have recently had its filter curves updated (e.g., JWST/NIRCAM), you should use our SVO query interface to make sure you get the most up-to-date filter curves. If you know the SVO-designated name of the filter you want, you can use [`get_filter`](@ref) to retrieve its transmission data, which returns an instance of [`PhotometricFilter`](@ref).
**NOTE THAT THESE INCLUDED FILTER CURVES ARE NOT GUARANTEED TO BE UP-TO-DATE.** If you are using a filter/instrument that may have recently had its filter curves updated (e.g., JWST/NIRCAM), you should use our SVO query interface to make sure you get the most up-to-date filter curves. SVO also provides additional metadata that is useful for some applications (e.g., filter zeropoints). If you know the SVO-designated name of the filter you want, you can use [`get_filter`](@ref) to retrieve its transmission data, which returns an instance of [`SVOFilter`](@ref PhotometricFilters.SVOFilter).

```@docs
get_filter
PhotometricFilters.SVOFilter
```

If you'd like to perform a search on the filters available through the SVO filter service, you can use [`query_filters`](@ref).
Expand All @@ -46,11 +49,22 @@ query_filters
## Supported Operations
We include functions for performing many common operations on photometric filters, summarized below.

### Accessors
```@docs
name
wave
throughput
detector_type
```

### Applying Filter Curves to Spectra

```@docs
apply
apply!
integrate
F_nu
F_lambda
```

### Statistics
Expand All @@ -65,8 +79,9 @@ PhotometricFilters.fwhm
PhotometricFilters.width
```

## Internal Functions
## Internals
```@docs
PhotometricFilters.AbstractFilter
PhotometricFilters.get_metadata
```

Expand Down
9 changes: 7 additions & 2 deletions src/PhotometricFilters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ export PhotometricFilter,
get_filter,
query_filters,
wave,
throughput,
throughput,
detector_type,
name,
apply,
apply!
apply!,
integrate,
F_nu,
F_lambda

include("core.jl") # types and base utilities (like size, length)
include("library.jl") # the library of filters
Expand Down
Loading
Loading