Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application hist outputs bad stats when all DNs are special pixels #3709

Closed
scsides opened this issue Feb 24, 2020 · 3 comments · Fixed by #4412
Closed

Application hist outputs bad stats when all DNs are special pixels #3709

scsides opened this issue Feb 24, 2020 · 3 comments · Fixed by #4412
Assignees
Labels
bug Something isn't working
Milestone

Comments

@scsides
Copy link
Contributor

scsides commented Feb 24, 2020

All versions

Description
The application "hist" outputs valid looking statistics when the input cube is full of special pixels.

How to reproduce

makecube pixels=NULL to=junk.cub samples=10 lines=5 bands=1
hist from=junk.cub to=junk.txt
cat junk.txt

Cube:           8.cub
Band:           1
Average:        -1.79769e+308
Std Deviation:  -1.79769e+308
Variance:       -1.79769e+308
Median:         -1.79769e+308
Mode:           -1.79769e+308
Skew:           -1.79769e+308
Minimum:        -1.79769e+308
Maximum:        -1.79769e+308

Total Pixels:    120
Valid Pixels:    0
Null Pixels:     120
Lis Pixels:      0
Lrs Pixels:      0
His Pixels:      0
Hrs Pixels:      0



Possible Solution
Test the returned value against ISIS::NULL when hist gets the stats. Print N/A instead of -1.79769e+308. It is an edge case, but we should not print a legal looking number when the return is trying to tell the programmer there is a problem.

Additional context

@jessemapel jessemapel added the enhancement New feature or request label Feb 24, 2020
@jessemapel
Copy link
Contributor

jessemapel commented Feb 24, 2020

Not sure if this is a bug or enhancement, but I'm just going with enhancement as the program is correctly ignoring special pixels, it just returns the double value of ISIS:null instead of a more user friendly output when there are no valid pixels.

@scsides scsides added bug Something isn't working and removed enhancement New feature or request labels Feb 24, 2020
@ascbot
Copy link
Contributor

ascbot commented Sep 1, 2020

I am a bot that cleans up old issues that do not have activity.

This issue has not received feedback in the last six months. I am going to add the inactive label to
this issue. If this is still a pertinent issue, please add a comment or add an emoji to an existing comment.

I will post again in five months with another reminder and will close this issue on it's birthday unless it has
some activity.

@ascbot ascbot added the inactive Issue that has been inactive for at least 6 months label Sep 1, 2020
@jessemapel
Copy link
Contributor

This is a good thing to still do since we just did this for stats in #3895

@jessemapel jessemapel removed the inactive Issue that has been inactive for at least 6 months label Sep 1, 2020
@acpaquette acpaquette added this to the 5.0.1 milestone Apr 10, 2021
@amystamile-usgs amystamile-usgs self-assigned this Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants