# fixed hips cube issues and honor some HiPS properties

XMLWordPrintable

#### Details

• Type: Story
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
• Story Points:
2
• Sprint:
SUIT Sprint 2018-04
• Team:
Science User Interface

#### Description

Do the following:

1. Cubes: fixed the bugs related to moving between HiPS cubes and regular hips
2. Cubes: display the correct current plane number and the total plane number  when switching between HiPS cube
3. Cubes: honor the data_cube_* properties and show information about the 3rd dimension
• Use: value = crval3 + (cubeIdx - crpix3 ) * cdelt3
4. Make field of view and target optional and then, if they are not specified by the user, default to the HiPS properties hips_initial_ra, hips_initial_dec, and hips_initial_fov.  If neither are available show 180 degrees at 0,0.

#### Activity

Hide
Gregory Dubois-Felsmann added a comment -

Confirming that I see all these fixes on irsawebdev5 right now.

For #3, the display of the 3rd coordinate, I make the following suggestion: the floating-point format for the display of the number should be chosen so that it displays as many digits to the right of the decimal point as needed to be sure that a change by one plane produces a change in the two least-significant digits. Very roughly this means that the resolution for display of a single step is always better than about 10% of the step size.

The precise algorithm could be:

1. If data_cube_cdelt3 > 10, display no digits after the decimal point;
2. else display 1 - int( log10( data_cube_cdelt3 ) ) digits after the decimal point.

I am assuming that you have an int() function that always rounds down, even for negative numbers. That is different behavior than for the usual floor() function. If you only have floor(), ping me and I'll give you the slightly more complex rule.

Show
Gregory Dubois-Felsmann added a comment - Confirming that I see all these fixes on irsawebdev5 right now. For #3, the display of the 3rd coordinate, I make the following suggestion: the floating-point format for the display of the number should be chosen so that it displays as many digits to the right of the decimal point as needed to be sure that a change by one plane produces a change in the two least-significant digits. Very roughly this means that the resolution for display of a single step is always better than about 10% of the step size. The precise algorithm could be: If data_cube_cdelt3 > 10 , display no digits after the decimal point; else display 1 - int( log10( data_cube_cdelt3 ) ) digits after the decimal point. I am assuming that you have an int() function that always rounds down, even for negative numbers. That is different behavior than for the usual floor() function. If you only have floor() , ping me and I'll give you the slightly more complex rule.
Hide
Trey Roby added a comment -

Ok, i will put that in

Show
Trey Roby added a comment - Ok, i will put that in
Hide
Gregory Dubois-Felsmann added a comment -

On this ticket (which I see is marked Done) or do you want a followup ticket?

Show
Gregory Dubois-Felsmann added a comment - On this ticket (which I see is marked Done) or do you want a followup ticket?
Hide
Emmanuel Joliet added a comment -

For records, code changed as suggested:

 DM-13989: better control of precision based on cdelt3   - decimalPoints= Math.abs(cdelt3)>10 ? 0 : 1- Math.trunc(Math.log10(Math.abs(cdelt3)));   c65903c roby on 4/4/18 at 5:11 PM 

Show
Emmanuel Joliet added a comment - For records, code changed as suggested: DM-13989: better control of precision based on cdelt3   - decimalPoints= Math.abs(cdelt3)>10 ? 0 : 1- Math.trunc(Math.log10(Math.abs(cdelt3)));   c65903c roby <roby@ipac.caltech.edu> on 4/4/18 at 5:11 PM

#### People

Assignee:
Trey Roby
Reporter:
Trey Roby
Reviewers:
Cindy Wang [X] (Inactive)
Watchers:
Cindy Wang [X] (Inactive), Emmanuel Joliet, Gregory Dubois-Felsmann, Trey Roby, Xiuqin Wu [X] (Inactive)