{"action":"created","issue":{"url":"https://api.github.com/repos/astropy/specutils/issues/291","repository_url":"https://api.github.com/repos/astropy/specutils","labels_url":"https://api.github.com/repos/astropy/specutils/issues/291/labels{/name}","comments_url":"https://api.github.com/repos/astropy/specutils/issues/291/comments","events_url":"https://api.github.com/repos/astropy/specutils/issues/291/events","html_url":"https://github.com/astropy/specutils/pull/291","id":354193311,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExMDE1MjA2","number":291,"title":"[WIP] Continuum normalization","user":{"login":"alexji","id":3082382,"node_id":"MDQ6VXNlcjMwODIzODI=","avatar_url":"https://avatars3.githubusercontent.com/u/3082382?v=4","gravatar_id":"","url":"https://api.github.com/users/alexji","html_url":"https://github.com/alexji","followers_url":"https://api.github.com/users/alexji/followers","following_url":"https://api.github.com/users/alexji/following{/other_user}","gists_url":"https://api.github.com/users/alexji/gists{/gist_id}","starred_url":"https://api.github.com/users/alexji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexji/subscriptions","organizations_url":"https://api.github.com/users/alexji/orgs","repos_url":"https://api.github.com/users/alexji/repos","events_url":"https://api.github.com/users/alexji/events{/privacy}","received_events_url":"https://api.github.com/users/alexji/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-08-27T06:17:54Z","updated_at":"2018-09-06T20:48:57Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/astropy/specutils/pulls/291","html_url":"https://github.com/astropy/specutils/pull/291","diff_url":"https://github.com/astropy/specutils/pull/291.diff","patch_url":"https://github.com/astropy/specutils/pull/291.patch"},"body":"This is addressing #231.\r\nTo start, two continuum fitting functions have been defined:\r\n\r\n* `fit_continuum_generic` takes in a spectrum and fits a user-specified model (from `astropy.modeling`) with iterative sigma clipping. Exclusion regions can be specified. This is the most minimal implementation of the interface suggested [here](https://github.com/spacetelescope/dat_pyinthesky/blob/master/pyinthesky_specutils_fitting.ipynb)\r\n* `fit_continuum_linetools` that is a direct port of the algorithm in [linetools](https://github.com/linetools/linetools/blob/master/linetools/analysis/continuum.py). The only change is making it compatible with specutils.Spectrum1D and changing the Akima spline to scipy's version. This does not yet satisfy the expected interface.\r\n\r\nNeeded before PR is complete:\r\n- [ ] unit tests\r\n- [ ] examples in docs\r\n- [ ] ideally an astropy.modeling subclass that implements spline-like models (and possibly a corresponding fitter class?)\r\n- [ ] proper implementation of quantities (I have just turned everything into an array ignoring units)\r\n\r\nAdvice/examples of how to organize unit tests/testing data would be very helpful!\r\nI have also been unable to write/run tests because most of my spectra cannot be read by the current spectrum readers. These are spectra that are compatible with IRAF (multispec format).\r\n"},"comment":{"url":"https://api.github.com/repos/astropy/specutils/issues/comments/419236402","html_url":"https://github.com/astropy/specutils/pull/291#issuecomment-419236402","issue_url":"https://api.github.com/repos/astropy/specutils/issues/291","id":419236402,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTIzNjQwMg==","user":{"login":"alexji","id":3082382,"node_id":"MDQ6VXNlcjMwODIzODI=","avatar_url":"https://avatars3.githubusercontent.com/u/3082382?v=4","gravatar_id":"","url":"https://api.github.com/users/alexji","html_url":"https://github.com/alexji","followers_url":"https://api.github.com/users/alexji/followers","following_url":"https://api.github.com/users/alexji/following{/other_user}","gists_url":"https://api.github.com/users/alexji/gists{/gist_id}","starred_url":"https://api.github.com/users/alexji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexji/subscriptions","organizations_url":"https://api.github.com/users/alexji/orgs","repos_url":"https://api.github.com/users/alexji/repos","events_url":"https://api.github.com/users/alexji/events{/privacy}","received_events_url":"https://api.github.com/users/alexji/received_events","type":"User","site_admin":false},"created_at":"2018-09-06T20:48:57Z","updated_at":"2018-09-06T20:48:57Z","author_association":"NONE","body":"Yeah, I agree this is a good idea!\r\n\r\nThe only way I have thought to do this is to have spline-specific models and fitters that are meant to work together, and will error if the wrong model/fitter combination are used. Otherwise I think we would need to reimplement the highly optimized spline-specific fitters.\r\n\r\nIf that sounds good, then I will make relevant subclasses and include them here in a way that hopefully can be easily ported to astropy."}}
{"actor":{"display_login":"alexji"}}