HENDRICS icon indicating copy to clipboard operation
HENDRICS copied to clipboard

Give error if HENreadevents reads a FITS lightcurve

Open matteobachetti opened this issue 4 years ago • 1 comments

At the moment, HENreadevents reads a FITS light curve with just a mild warning. It should realize if it is a light curve, and give a stronger warning or just fail. Thanks @giallix

matteobachetti avatar Dec 20 '21 20:12 matteobachetti

Hey!! @matteobachetti, I have succesfully reproduced this issue and have made suggested modifications:

Image

Here, I have introduced a code to identify if a lightcurve file is input, if it is, then the code will Display the message:

The file {file_name} appears to be a light curve.

and ask the user:

Do you want to proceed with reading the file? [y/N]:

Now, depending upon the user choice, the file will be processed further(Both cases are in the attached image).

I would like to have your suggestion and comments on this. I am creating a PR with some more refining in the code.

P.S: ignore the "F1" in the terminal, it was for testing purpose.

Sudarshan-21 avatar Apr 16 '25 18:04 Sudarshan-21