Comments (5)
@wkerzendorf @nhmc this issue needs to be resolved before #69 can be merged. Is the problem with the IRAF data files, or the WCS functions?
from specutils.
I believe the problem is with the WCS functions - they assign the first pixel a value of zero, (instead of one, which is what IRAF does). There's a keyword to the WCS method .wcs_pix2world()
which accepts 0 or 1 to indicate the indexing convention. So I think that's all that needs to be changed.
from specutils.
It looks like the arange
at line 263 in https://github.com/astropy/specutils/blob/master/specutils/spectrum1d.py needs to be changed to accept a starting index of either 0 or 1. I would add a new keyword to Spectrum1D.__init__
to indicate either a 0 or 1 indexing convention. This would set an attribute to be checked in Spectrum1D.dispersion
to see whether arange
should start with 0 or 1.
@wkerzendorf, do you think this is the best approach?
from specutils.
What @nhmc says, is very likely the cause of the problem. The indexing in IRAF starts with 1 (maybe because FORTRAN uses this idea). I think, however, that we should stay with 0-indexing throughout specutils
. That will avoid any pitfalls. As a step forward we need to make sure that when we read-in WCS from fits files to subtract 1.
from specutils.
This issue will be fixed with #72
from specutils.
Related Issues (20)
- Better document/test user-made GWCS input
- Specutils in the muler and gollum ecosystem and prospect for upstreaming HOT 3
- TST: Ensure numpy dev is actually installed in devdeps
- TST: Python 3.12
- Spectrum1d.read suddenly won't read JWST x1d data automatically. HOT 1
- Serialization of Spectrum1D object (How to make Spectrum1D pickle-able?)
- Can spectrum object be lazy?
- TST: oldest deps job failed because something is forcing numpy upgrade to 1.24
- BUG: version number is off for `stable` on RTD HOT 1
- Why are SDSS spPlate readers "hidden" in the sdss.py loader? HOT 1
- Round tripping read/write does not preserve WCS HOT 5
- Improve/Update Developer docs HOT 5
- Add spPlate test HOT 1
- Improve documentation about headers
- Inconsistant expectation for location of header data (vs. other metadata) HOT 2
- Create a reader for DESI data files HOT 2
- Spectrum1D WCS has wrong number of dimensions as an NDCube HOT 1
- SpectralCoord can't handle pixel units
- Possible bug: correlation.template_correlate throws an error if given Spectrum1D objects with no flux uncertainties defined. HOT 2
- Fix broken `SpectralRegion` links in docstrings
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from specutils.