Skip to content

Firefly-88: Improve coverage, catalog & Image layer handling #835

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

Merged
merged 1 commit into from
Jul 30, 2019

Conversation

robyww
Copy link
Contributor

@robyww robyww commented Jul 16, 2019

Firefly-88: Improve coverage/Catalog/Image layer handling

  • icons for center and copy to clipboard
  • Coverage layer working
  • image layer will container search target and will hide image
  • new type of drawing symbol - POINT_MARKER
  • center working
  • copy to clipboard working
  • parsing CIRCE from ADQL query
  • cleaned up ToolbarButton
  • added new test to test api setting of HiPS
  • fixed api sagas that were not turned on in API Mode
  • added ACTIVE CSS style to show button press
  • coordinate sys will parse as ICRS as j2000 for now

https://jira.ipac.caltech.edu/browse/FIREFLY-88

To Test:

https://irsawebdev9.ipac.caltech.edu/firefly-88-coverage-map/firefly/

  • Search a catalog, noticed improved drawing layer controls

  • Gor catalog control notice how to control the color/size/symbol of the catalog and the image center separately.

  • Search a second catalog, one again look a drawing layer controls

  • notice base image drawing layer control

  • notice new marking for the target look similar to the new icon: 20x20-center-small

  • After reload do an image search, notice drawing layers controls for image with center control enabled.

  • Try new test page: https://irsawebdev9.ipac.caltech.edu/firefly-88-coverage-map/firefly/test/test-misc.html

Fixes:

  • Regression color issue in dropdown menus is fixed.
  • Changing the HiPS image for coverage is not longer reverted back when a new table is loaded.

@robyww robyww requested a review from tgoldina July 16, 2019 22:26
@robyww robyww self-assigned this Jul 16, 2019
@robyww robyww requested review from gpdf, ejoliet and vandesai1 July 16, 2019 22:27
@robyww robyww changed the title Firefly-88: Improve coverage/Catalog layer handling Firefly-88: Improve coverage/Catalog & image layer handling Jul 16, 2019
@robyww robyww changed the title Firefly-88: Improve coverage/Catalog & image layer handling Firefly-88: Improve coverage/Catalog & Image layer handling Jul 16, 2019
@robyww robyww changed the title Firefly-88: Improve coverage/Catalog & Image layer handling Firefly-88: Improve coverage, catalog & Image layer handling Jul 16, 2019
Copy link
Contributor

@ejoliet ejoliet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a lot of changes. I'm just starting to look at different ticket related that triggered this improvements. I've tried to look at TimeSeries (IRSA-789). When i go to drawer layer and uncheck the target, the image disappear.
Icon and feature in the dialog layer is awesome BTW!
To be continued.

@ejoliet
Copy link
Contributor

ejoliet commented Jul 17, 2019

Suggestion to be discussed: when doing a catalog search, center searched might come up with different color - it's already a different symbol which is good.

@robyww
Copy link
Contributor Author

robyww commented Jul 17, 2019

Looks like a lot of changes. I'm just starting to look at different ticket related that triggered this improvements. I've tried to look at TimeSeries (IRSA-789). When i go to drawer layer and uncheck the target, the image disappear.

I think you are unchecking the image. I provided a separate way undo the target but I did not use a check box to maintain the one-checkbox-per-layer look

@robyww
Copy link
Contributor Author

robyww commented Jul 17, 2019

Suggestion to be discussed: when doing a catalog search, center searched might come up with different color - it's already a different symbol which is good.

We could do a different color. Might be better.

@ejoliet
Copy link
Contributor

ejoliet commented Jul 17, 2019

I think you are unchecking the image. I provided a separate way undo the target but I did not use a check box to maintain the one-checkbox-per-layer look

no, i'm unchecking the checkbox in the layer dialog, which is acting ok anywhere else in IRSAViewer or SOFIA, but in TS, is removing the image (???).

@ejoliet
Copy link
Contributor

ejoliet commented Jul 17, 2019

@deannaji i think SOFIA is not using the updated image toolbar - could you check. I've built SOFIA locally with this PR and i don;t see the changes, also in https://irsadev.ipac.caltech.edu/applications/sofia/ with the updated center target menu too is not appearing. @robyww is there an option to be passed or is just a newer component class to use?
Thanks!

@ejoliet
Copy link
Contributor

ejoliet commented Jul 17, 2019

@robyww you are right, the checkbox in the drawer layer is not making the image disappear on purpose. Was that a design request? i don't really follow the reasoning behind but if that the request, then the feature works ;-)

@robyww
Copy link
Contributor Author

robyww commented Jul 17, 2019

I went though so much writeup it is hard to keep track whether that was written or a oral request in the last year. The point of being able to hide the image is that if you have a lot of overlay and want to focus on that instead of the image (or just want a consistent background) hiding the image allows for that.

@deannaji
Copy link
Contributor

Tested SOFIA, looks good from my end.

@xiuqin
Copy link
Contributor

xiuqin commented Jul 18, 2019 via email

@tgoldina
Copy link
Contributor

When I do catalog search (m31, 100''), the center of catalog appears as a yellow target symbol on the 'WISE Atlas W1' coverage image.

I then replace coverage image with 'WISE W4'. The center of catalog symbol is is still in the same place.

Now I see more controls under Image, the first entry in drawing layers. If I Show/Hide the yellow target symbol moves. Now it probably means the center of the image.

Is it the expected behavior? Should the coverage image have this Show/Hide control?

If yes, is it possible to show the center of the catalog on the coverage image at this point?

@robyww
Copy link
Contributor Author

robyww commented Jul 18, 2019

When I do catalog search (m31, 100''), the center of catalog appears as a yellow target symbol on the 'WISE Atlas W1' coverage image. .........

I did not try that. I think you found a new issue. They way it is working is that when the coverage watch plots an image it specifically has a setting not to show the center from the image control. It handles that. However, the test you did replaces the image and then the image control shows the center.

I will try to figure out what to do. This whole ticket involves juggling who shows the search center. In some cases there is the image search target and in other it is the catalog search target. When there are multiple catalog search targets they really don't care about the image one.

Copy link
Contributor

@tgoldina tgoldina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good, I like how drawing layer controls look. I think it is a big improvement.

Verified implementation of the following items from https://confluence.ipac.caltech.edu/pages/viewpage.action?spaceKey=FIREFLY&title=Rules+for+presenting+search+results+in+Layers+Dialog :
Tables: 1,2a, 2c, 2f, 2g and Images: 1, 2a, 2d

The only confusing thing for me is the behavior of fixed marker (represented by yellow target center symbol). It is not obvious what this marker represents and how to change it in conflicting situations. For example, in you test case with two catalogs, it shows the center point of the first catalog. If I delete the first catalog, the marker will simply disappear.
To me it is also confusing that the symbol is the same as recenter symbol. Re-centering does not change the location of the marker.


<template title="API 2 Table / Customized HiPS" style='height: 400px' class="tpl" >
<div id="expected" style="position: relative" >
<div class="source-code indent-3" style="position: absolute; bottom: 0; left: 0">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text in "expected" is cut. May be add 'overflow: auto'?

@@ -128,6 +129,7 @@ export function initApi() {
dispatchOnAppReady(() => {
window.onFireflyLoaded && window.onFireflyLoaded(firefly);
});
startTTFeatureWatchers();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it's the reason I see an exception when running https://irsawebdev9.ipac.caltech.edu/firefly-88-coverage-map/firefly/test/tests-main.html

Failed to catalog plot data: TypeError: n.map is not a function
09:52:03.505 WebUtil.js:338 TypeError: n.map is not a function
at Catalog.js:308
at Array.map ()
at Catalog.js:307
at Catalog.js:263
at MT.factoryDef (Catalog.js:227)
at RA.getDrawData (DrawLayerFactory.js:130)
at Kf (DrawLayerReducer.js:223)
at DrawLayerReducer.js:92
at DrawLayerReducer.js:41
at IO (DrawLayerCntlr.js:760)

@robyww
Copy link
Contributor Author

robyww commented Jul 18, 2019

@tgoldina I think you found at least 2 bugs. I will work on fixing them.

Bugs summary:

  • Markers are wrong, sometimes an image marker show when it should not.
  • Catalog marker should be the new POINT_MARKER, it is currently circle
  • When you replace the coverage plot the settings are being lost with the new plot
  • stack trace issue
  • cut off label.

@vandesai1
Copy link

Gregory Dubois-Felsmann and I reviewed this ticket on https://irsawebdev9.ipac.caltech.edu/firefly-88-coverage-map/firefly.

Some very nice functionality there! A few comments:

BUG. If I do a FITS image search followed by a catalog search that results in a HiPS coverage map, the FITS image layers dialog gets "contaminated" with information about the HiPS image.

BUG/Improvement. If I do a search in galactic coordinates, the copy-to-clipboard only copies the numeric part of the coordinates, so that if you paste it into an IRSA Viewer search box, your search will not be done in galactic coordinates. To fix this, make sure that the clipboard is always producing decimal ra and dec in ICRS or J2000.

Labels: In the layers dialog, the mouseover for the new centering icon has two instances of "on" and the dashes kind of look like minus signs next to the coordinates. Also, the translation of coordinates is interesting information, but frustrating because it cannot be cut and pasted. Change the mouseover to simply state "Center on this position."

UI: In the image layers dialog, the entered object name should not be bolded, and "by NED" should be changed to "(NED)"

UI: In the image layers dialog, the Show/Hide buttons took us awhile to figure out. Instead, put a checkbox next to the search position, so the associated marker can be toggled off and on.

UI: In the coverage layers dialog, there is no way to turn off the catalog search position marker. Can we have a checkbox to control that?

@robyww
Copy link
Contributor Author

robyww commented Jul 23, 2019

BUG. If I do a FITS image search followed by a catalog search that results in a HiPS coverage map, the FITS image layers dialog gets "contaminated" with information about the HiPS image.

This bug has been there for a while. I think we should fix that in another ticket.

BUG/Improvement. If I do a search in galactic coordinates, the copy-to-clipboard only copies the numeric part of the coordinates, so that if you paste it into an IRSA Viewer search box, your search will not be done in galactic coordinates. To fix this, make sure that the clipboard is always producing decimal ra and dec in ICRS or J2000.

This is easy to do. However, I can imagine cases where the user would expect what he copied to be what is shown and convert. We could include the coordinate system as well in what is copied.

done

Labels: In the layers dialog, the mouseover for the new centering icon has two instances of "on" and the dashes kind of look like minus signs next to the coordinates. Also, the translation of coordinates is interesting information, but frustrating because it cannot be cut and pasted. Change the mouseover to simply state "Center on this position."

OK - done

UI: In the image layers dialog, the entered object name should not be bolded, and "by NED" should be changed to "(NED)"

OK - done

UI: In the image layers dialog, the Show/Hide buttons took us awhile to figure out. Instead, put a checkbox next to the search position, so the associated marker can be toggled off and on.

I purposely used a different UI element because I did not what it is be considered at the same level as the UI checkbox which will turn the whole layer off. I will play with this but I has some concerns.

done - added at the right not the left so that it is not confused with the layer checkbox

UI: In the coverage layers dialog, there is no way to turn off the catalog search position marker. Can we have a checkbox to control that?

I can make a on/off here but I have the same concerns the same concerns as above. Also- the layer checkbox will turn everything off in the layer. If I had a checkbox here it will not be independent of the layer checkbox. It will simple hide target when the layer is on. If the layer is off then the target will be hidden even it a checkbox is on. If we want complete independence then they should probably be managed as separate layers.

done - added at the right not the left so that it is not confused with the layer checkbox

@robyww robyww force-pushed the firefly-88-coverage-map branch 3 times, most recently from 3256e95 to 768440d Compare July 25, 2019 19:25
@ejoliet
Copy link
Contributor

ejoliet commented Jul 30, 2019

@robyww might be fixed or not in this PR but when i look at SOFIA coverage and click "restore to default", the viewer goes in FITS viewer mode, HiPS option disappear...
https://irsawebdev9.ipac.caltech.edu/sofia-ff-148/applications/sofia/

@robyww
Copy link
Contributor Author

robyww commented Jul 30, 2019

i see it. It is really unrelated to this work but I will go ahead and fix it in this PR.

   - icons for center and copy to clipboard
   - Coverage layer working
   - image layer will container search target and will hide image
   - new type of drawing symbol - POINT_MARKER
   - center working
   - copy to clipboard working
   - parsing CIRCE from ADQL query
   - cleaned up ToolbarButton
   - added new test to test api setting of HiPS
   - fixed api sagas that were not turned on in API Mode
   - added ACTIVE CSS style to show button press
   - coordinate sys will parse as ICRS as j2000 for now
   - Firefly-85, fix: toolbar not longer selectable.
   - Added an exclusive option to template
   - Bug fix: reset to defaults loses hips/fits options
           - fixed reset to original losing pvOptions
   - update, fixes, responds to feedback:
           - Markers are wrong, sometimes an image marker show when it should not.
           - Catalog marker should be the new POINT_MARKER, it is currently circle
           - When you replace the coverage plot the settings are being lost with the new plot
           - The cut off text in image layer title, sizes correctly now.
           - clipboard target to j2000
           - change center mouse over tool tip to ‘Center on this position’
           - plot with search center mark hide/show to checkbox
           - don’t bold search object, use parents instead of by
           - make catalog center check box hide/show checkbox
@robyww robyww force-pushed the firefly-88-coverage-map branch from 30e359f to 6382f34 Compare July 30, 2019 21:46
@robyww robyww merged commit 6d0d1a4 into dev Jul 30, 2019
@robyww robyww deleted the firefly-88-coverage-map branch October 30, 2019 21:27
@robyww robyww added enhancement overlay-drawing overlay drawing for images or HiPS labels Oct 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement overlay-drawing overlay drawing for images or HiPS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants