Coder Social home page Coder Social logo

Comments (5)

shaileshahuja avatar shaileshahuja commented on July 17, 2024

@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.

nhmc avatar nhmc commented on July 17, 2024

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.

nhmc avatar nhmc commented on July 17, 2024

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.

wkerzendorf avatar wkerzendorf commented on July 17, 2024

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.

shaileshahuja avatar shaileshahuja commented on July 17, 2024

This issue will be fixed with #72

from specutils.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.