{"action":"created","issue":{"url":"https://api.github.com/repos/sncosmo/sncosmo/issues/99","labels_url":"https://api.github.com/repos/sncosmo/sncosmo/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/sncosmo/sncosmo/issues/99/comments","events_url":"https://api.github.com/repos/sncosmo/sncosmo/issues/99/events","html_url":"https://github.com/sncosmo/sncosmo/issues/99","id":97833187,"number":99,"title":"better bandpass treatment","user":{"login":"kbarbary","id":970135,"avatar_url":"https://avatars.githubusercontent.com/u/970135?v=3","gravatar_id":"","url":"https://api.github.com/users/kbarbary","html_url":"https://github.com/kbarbary","followers_url":"https://api.github.com/users/kbarbary/followers","following_url":"https://api.github.com/users/kbarbary/following{/other_user}","gists_url":"https://api.github.com/users/kbarbary/gists{/gist_id}","starred_url":"https://api.github.com/users/kbarbary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbarbary/subscriptions","organizations_url":"https://api.github.com/users/kbarbary/orgs","repos_url":"https://api.github.com/users/kbarbary/repos","events_url":"https://api.github.com/users/kbarbary/events{/privacy}","received_events_url":"https://api.github.com/users/kbarbary/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-29T01:06:04Z","updated_at":"2015-07-29T14:31:53Z","closed_at":null,"body":"The bandpasses included with sncosmo as \"built-ins\" are sometimes \"down-sampled\" and \"truncated\" if their sampling is too fine or they cover a large wavelength range. It would be good to be able to:\r\n\r\n- store the raw bandpass definitions\r\n- take care of down-sampling & truncation in software (when loading bandpass)\r\n- add multiple versions of a bandpass while we're at it(?)\r\n\r\n### Background\r\n\r\n- **Down-sampling** is reducing the wavelength resolution of the bandpass. This is done simply for performance reasons: when integrating a SN spectrum through a bandpass, we need to chose some wavelength grid on which to evaluate the spectrum and the bandpass. Currently, we just use the wavelengths at which the bandpass is defined. This makes evaluating the bandpass simple - no interpolation necessary! However, the time it takes to do an integral scales linearly with the number of bandpass samples, so we don't want to sample more finely than necessary. In practice, a resolution of 5 Angstroms in wavelength is usually good (and is incidentally what SALT2/snfit uses).\r\n\r\n- **Truncation** is reducing the wavelength coverage of the bandpass at low and high wavelengths. Practically, many bandpass definitions include a huge range of wavelengths where the transmission is zero or very nearly so, as a measurement of \"out-of-band\" transmission. This is of interest for some studies. For us, this wide wavelength coverage usually just hurts performance (simply because there are more samples; see above) and causes problems with model wavelength coverage: the model is only defined over a finite wavelength range, and we require that the bandpass definition not extend past the model. A wider bandpass makes this more difficult (or limits the range of redshifts where we can integrate the model through the bandpass)."},"comment":{"url":"https://api.github.com/repos/sncosmo/sncosmo/issues/comments/125970486","html_url":"https://github.com/sncosmo/sncosmo/issues/99#issuecomment-125970486","issue_url":"https://api.github.com/repos/sncosmo/sncosmo/issues/99","id":125970486,"user":{"login":"kbarbary","id":970135,"avatar_url":"https://avatars.githubusercontent.com/u/970135?v=3","gravatar_id":"","url":"https://api.github.com/users/kbarbary","html_url":"https://github.com/kbarbary","followers_url":"https://api.github.com/users/kbarbary/followers","following_url":"https://api.github.com/users/kbarbary/following{/other_user}","gists_url":"https://api.github.com/users/kbarbary/gists{/gist_id}","starred_url":"https://api.github.com/users/kbarbary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbarbary/subscriptions","organizations_url":"https://api.github.com/users/kbarbary/orgs","repos_url":"https://api.github.com/users/kbarbary/repos","events_url":"https://api.github.com/users/kbarbary/events{/privacy}","received_events_url":"https://api.github.com/users/kbarbary/received_events","type":"User","site_admin":false},"created_at":"2015-07-29T14:31:53Z","updated_at":"2015-07-29T14:31:53Z","body":"@rcthomas See [this line](https://github.com/sncosmo/sncosmo/blob/c4b2bf7ae76a4ad3bd821a7b4ee378d2520cde75/sncosmo/models.py#L134).\r\n\r\n@PaulKuin That's a good thing to keep in mind, thanks. It would be good to find a way to be more rigorous and systematic about this, even if that involves some approximation (as you say). Including the full bandpass definition will be the first step I think.\r\n"}}