Giter VIP home page Giter VIP logo

Comments (11)

nden avatar nden commented on August 15, 2024

Like all FITS keywords.

from stwcs.

mcara avatar mcara commented on August 15, 2024

Like all FITS keywords.

No, this is different. This is not about wcsname being the same as WCSNAME but rather:

WCSNAME = SOME NAME

being the same as

WCSNAME = Some Name

or

WCSNAME = some name

from stwcs.

mcara avatar mcara commented on August 15, 2024

In other words, if we want to have only a single Alt WCS with a given WCSNAME, should the following be allowed or not:

WCSNAMEA=Some Name
WCSNAMEB=SOME NAME
WCSNAMEC=some name

?

from stwcs.

nden avatar nden commented on August 15, 2024

Oh, you are asking about the value. There's no convention.

from stwcs.

mcara avatar mcara commented on August 15, 2024

Current code treats WCSNAME values as case-insensitive for the purpose of identifying corresponding WCS keys. Should is this how we want to have WCS names be when they are compared?

from stwcs.

mcara avatar mcara commented on August 15, 2024

There's no convention.

This suggests that the comparison should not be case-insensitive, i.e., name1 should be considered distinct from NAME1, right?

from stwcs.

stsci-hack avatar stsci-hack commented on August 15, 2024

Treating WCSNAME values as case-insensitive makes it easier for the user to see that there are differences in the WCSs. It would be immensely confusing (as if it isn't already confusing enough) to explain to a user why a WCS named 'IDC_a123458bq-hsc30' is not the same as 'IDC_a123458bq-HSC30' since both reference 'HSC30'. Besides, users are already used to FITS keywords being case-insensitive, so simplifying the treatment of alternate WCSs by making them case-insensitive seems to be consistent with FITS. Therefore, it would be the most user-friendly, in my opinion, to keep WCSNAME as case-insensitive.

from stwcs.

mcara avatar mcara commented on August 15, 2024

But why would our software sometimes write 'IDC_a123458bq-hsc30' and sometimes 'IDC_a123458bq-HSC30'? I think the solution to this question now should be based on whether our existing software mixes cases when writing WCS names.

from stwcs.

stsci-hack avatar stsci-hack commented on August 15, 2024

I would not want to try to second-guess how these situations arise. However, users can provide a list of catalog names as an input parameter to the alignment code which would then get used to generate these names. If they provided lower-case one time and upper-case another (interactively, without thinking), they would end up with mixed cases as separate WCSs even though they may be identical. So, there are ways in which the user can cause this situation and make having WCSNAME be treated as case-insensitive be useful.

from stwcs.

mcara avatar mcara commented on August 15, 2024

Thanks!

from stwcs.

mcara avatar mcara commented on August 15, 2024

@stsci-hack But then there is code that is case sensitive, like here:

if wcs_id is not None:
wnames = altwcs.wcsnames(source[(extname, 1)].header)
wkeys = []
for letter in wnames:
if wnames[letter] == wcs_id:

It just seems that there is inconsistency in treating WCS names.

from stwcs.

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.