Coder Social home page Coder Social logo

Comments (8)

TarekHC avatar TarekHC commented on September 21, 2024 1

Hi @cosimoNigro and @maxnoe

This is something that was discussed in the past, and I believe the conclusion was we don't want to "impose" it. The issue was that looking at other instruments, each calls their IRFs with different EXTNAME (even if their meaning is identical), so if we added a fixed name to the specifications, then every single high-level IRF would not be GADF compliant.

I don't see any harm with suggesting one name, though. If in the future several effective areas are added to one FITS file, it will be easier for the user to understand their content if their name is descriptive, and will also guide the DL3 "producer". If several HDUs of the same type are added to a single file, they could have "*_N" labels.

I would perhaps add "recommended" EXTNAME values, different for each IRF component type (as I believe we have for the effective areas). But I don't have a strong opinion, as the HDUCLASn keyword family is the method we decided to use to identify HDUs.

from gamma-astro-data-formats.

cosimoNigro avatar cosimoNigro commented on September 21, 2024

It's mostly for science tools, If I want to load an IRF directly from a HDU I have to open the header and search in the specific HDUCLAS* keywords. But if the IRF component had a standardised EXTNAME then I could directly fetch it from the HDU list.

from gamma-astro-data-formats.

maxnoe avatar maxnoe commented on September 21, 2024

Actually, there is no difference between looking for a specific extname and specific HDUCLAS keywords. You have to loop through the file until you find it.

A FITS file is not a mapping with random access, it's a sequence of HDUs.

I dont think we should prescribe extnames and science Tools should not rely on them.

from gamma-astro-data-formats.

cosimoNigro avatar cosimoNigro commented on September 21, 2024

Ok I see your point, but beside the specific structure of the files and how we read it, wouldn't it be good to provide also mandatory values for EXTNAME to the specs?
The specifications we provide go beyond science tools and if people were to explore the CTA and the H.E.S.S. data they would find different HDU names. Of course they would be able to figure out what an AEFF is, but still, why not to provide uniform HDU names?
Why there is one recommended for the effective area and not for the others HDUs?

from gamma-astro-data-formats.

maxnoe avatar maxnoe commented on September 21, 2024

@cosimoNigro I don't think it makes sense to prescribe EXTNAMEs, since extnames must be unique but people might want to store multiple HDUs of the same type in the files.

E.g. Both point-like and FE IRFs or for different cut values, or different methods of background estimation as @AtreyeeS mentioned here gammapy/gammapy#3514.

There is already an issue about making the recommended extnames consistent: #165

However, I don't think there is a reason for science tools to rely on extnames other than when using HDU index tables.
If there is only one HDU per IRF component it is identifiable via the HDUCLAS header entries. If not, that's a case that is solvable by creating a hdu index table pointing to the one the science tools should use (using an arbitrary EXTNAME).

from gamma-astro-data-formats.

maxnoe avatar maxnoe commented on September 21, 2024

@TarekHC exactly, so as we have the other issue about providing recommendations (#165) and we don't want to require extnames, I think this issue can be closed, right?

from gamma-astro-data-formats.

TarekHC avatar TarekHC commented on September 21, 2024

If @cosimoNigro and others think it is ok to add recommendations, definitely close it. If others support Cosimo's suggestion of imposing the EXTNAME, feel free to re-open and farther justify the change.

My feeling is that following up on #165 would be easy, and a "good enough" solution.

from gamma-astro-data-formats.

cosimoNigro avatar cosimoNigro commented on September 21, 2024

Ok, then I am closing it and I will follow-up on #165.

from gamma-astro-data-formats.

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.