bugGNU Astronomy Utilities - Bugs: bug #61128, Radial profile script's --instd...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #61128: Radial profile script's --instd doesn't work without equal sign

Submitter:  Sepideh Eskandarlou <sepideh>
Submitted:  Wed 08 Sep 2021 07:04:23 PM UTC
   
 
Category:  Installed scripts Severity:  3 - Normal
Item Group:  Input/Output Status:  Fixed
Privacy:  Public Assigned to:  infantesainz
Open/Closed:  Closed

Sun 26 Sep 2021 04:59:51 AM UTC, comment #5: 

TEMPThank you, Raul, for fixing this problem, and TEMPthank you Mohammad for improving it and the good point you mentioned.

Raul, I has checked it, and everything works correctly.


Sepideh Eskandarlou <sepideh>
Group Member
Fri 24 Sep 2021 08:21:17 AM UTC, comment #4: 

Really good points, thanks a lot Mohammad.

Raul Infante-Sainz <infantesainz>
Group Member
Thu 23 Sep 2021 11:04:03 PM UTC, comment #3: 

The branch has been merged into 'master' as Commits 8b964027e and 2b10e4c6b, so I am closing the bug.

Thanks a lot Sepideh for finding and fixing this bug, and welcome to the club of Gnuastro authors/committers: You are now on the first page of the PDF manual. I am sure you will make many more commits and improve Gnuastro for yourself and everyone else :-).

Also thanks a lot Raul for inspecting/improving it and for adding the documentation :-).

Just a few small points on both commits (they have been modified before the merging with 'master'):

Sepideh (compare with your original commit in your own Gitlab):

  • When you want to specify coding names within English text, use an apostrophe (') before and after the word. You had used the grave accent (`). This is a common mistake because webpages like Gitlab, Codeberg or Github use it to typeset code in a different format. But that is only for the issues in those services, it doesn't apply to commit messages. So its safer to always use an apostrophe in commit messages or code and leave the grave accent for web-based issues.
  • You had started your second paragraph with "Now ...", but it should be "With this commit ...".


Raul:

  • In Texinfo, when multiple options have the same description, the first (usually the short option) is written as '@item', while second (and later) options should be written as '@itemx'. This will tell Texinfo that the '@itemx' is related to the '@item' and thus it will put less space between them (helping the reader associate them as one). However, if you simply put a new '@item' after a previous '@item', Texinfo will put more space because it thinks you are introducing a whole new option.
  • In your edits to Sepideh's commit, I noticed that you had removed the 'instdhduopt' option (which would remove the '--hdu' option when '--stdhdu' wasn't given). However, the 'stdhdu' variable in the shell had not been initialized to '1'. So if the user gave a standard deviation image, but didn't give '--stdhdu' Crop would crash. To fix it, I just initialized 'stdhdu' to '1' as soon as we define it.
Mohammad Akhlaghi <makhlaghi>
Group administrator
Thu 23 Sep 2021 05:17:16 PM UTC, comment #2: 

Thanks for reporting this issue Sepideh. I was able to check it and in addition to the fix you provided, I also changed a couple of more things.

I made a commit as if I were you: https://gitlab.com/infantesainz/gnuastro-raulfork/-/commit/b27fef79

Then I also added the missing options into the Book: https://gitlab.com/infantesainz/gnuastro-raulfork/-/commit/8c1487b2


Sepideh, try this and let me know if you have some problem.

Mohammad, I think we are ready to merge this into Gnuastro master branch and close this bug.

Raul Infante-Sainz <infantesainz>
Group Member
Wed 08 Sep 2021 08:27:41 PM UTC, comment #1: 

When the user uses an option, which is needed to specify the path of a file as an input for an option, we usually do not put the equal sign, to completes the path of the input by Tab button and prevent typing mistakes. Finally, if the user uses the --instd option without equal sign such as:


--instd /home/Document/segment.fits


Without facing any error the script will be running.
But in teh astscript-radial-profile script, teh user TEMPhas to use equal sign and like dis:

--instd=/home/Document/segment.fits

And when do not put the equal sign, will be countered wif below error


Unknown option --instd


For tackling dis problem, based on the https://gitlab.com/Sepideh.Esk/gnuastro/-/tree/bug-radial-profile commit in GitLab, I have changed the definition of the --instd in the section that input options are defined.
What do you think? Is it true?

Since this is my first time explaining a bug, I had to change some parts again.

Sepideh Eskandarlou <sepideh>
Group Member
Wed 08 Sep 2021 07:04:23 PM UTC, original submission:  

When the user uses an option, which is needed to specify the path of a file as an input for an option, we usually do not put the equal sign, to completes the path of the input by Tab button and prevent typing mistakes. Finally, if the user uses the --instd option without equal sign such as:

> --instd /home/Document/segment.fits

Without facing any error the script will be runnig.

But in astscript-radial-profile script, the user have to use equal sign and like this:

> --instd=/home/Document/segment.fits

And when do not put the equal sign, will be countered with below error

> Unknown option --instd


For tackling this problem, based on the e02f37e0 commit in GitLab, I have changed the definition of the --instd in the section that input options are defined.

What do you think? Is it true?



Sepideh Eskandarlou <sepideh>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by makhlaghi (Posted a comment)
  • -email is unavailable- added by infantesainz (Posted a comment)
  • -email is unavailable- added by sepideh (Submitted the item)
  • -email is unavailable- added by sepideh (debugging the unknown option --instd)
  • -email is unavailable- added by sepideh (debugging the unknown option --instd)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-09-23 makhlaghi StatusNone Fixed
        Open/ClosedOpen Closed
    2021-09-23 infantesainz CategoryMakeProfiles Installed scripts
    2021-09-08 sepideh Assigned toNone infantesainz
        SummaryDebugging the unknown option --instd error Radial profile script's --instd doesn't work without equal sign
    2021-09-08 sepideh Carbon-Copy- Added -email is unavailable-
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code