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

[Meta PR] Imviz: astrowidget API #632

Closed

Conversation

pllim
Copy link
Contributor

@pllim pllim commented May 20, 2021

Fix #631

Update: Actual implementation will be a series of smaller PRs with real code. But I would like to keep this open as a meta PR to keep track of progress.

MVP API list

Removed from MVP, see #632 (comment)

  • click_center
  • click_drag
  • scroll_pan

TODO

@pllim pllim added this to the Imviz 1.0 milestone May 20, 2021
@github-actions github-actions bot added the imviz label May 20, 2021
@pllim pllim requested review from eteq and astrofrog May 20, 2021 22:08
@pllim
Copy link
Contributor Author

pllim commented May 20, 2021

@eteq -- Does the separation look about right (MVP vs not MVP)? I will only attempt to implement MVP items for this round.

@astrofrog -- If some of the things are simply impossible, please let me know. Hopefully the API doc from astrowidgets is sufficient to explain what they are supposed to do.

Copy link
Contributor

@eteq eteq left a comment

Choose a reason for hiding this comment

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

I mostly agree with the MVP or not separation, but see my inline comments about the two that I think are currently "maybe depending on interpretation"

Comment on lines +149 to +224
def load_fits(self, fitsorfn, numhdu=None, memmap=None):
raise NotImplementedError

def load_nddata(self, nddata):
raise NotImplementedError

def load_array(self, arr):
raise NotImplementedError
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is MVP in the sense that it's part of the existing load_data, right? I.e., these could be trivial wrappers into that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we debated whether having load_xxx in addition to imviz.load_data would be too confusing.

PEP 20: There should be one-- and preferably only one --obvious way to do it.

jdaviz/configs/imviz/helper.py Outdated Show resolved Hide resolved
raise NotImplementedError

@property
def scroll_pan(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

I first red this as scroll_pun, and have to say I'm a bit disappointed in the reality that it's pan

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can have a scroll_pun mode where the viewer just spews puns in the "snackbar" as you scroll...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pllim pllim force-pushed the have-you-seen-my-astrowidgets-duckling branch from 11f61e9 to 1c5316d Compare June 15, 2021 20:20
def save(self, filename):
raise NotImplementedError

# markers (MVP)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@eteq -- Are we on the same page w.r.t. markers now?

Still need to discuss loaders.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Markers MVP: See #699

@pllim pllim changed the title Imviz: astrowidget API [Meta PR] Imviz: astrowidget API Jun 16, 2021
Comment on lines +99 to +103
def center_on(self, point):
raise NotImplementedError

def offset_to(self, dx, dy, skycoord_offset=False):
raise NotImplementedError
Copy link
Contributor Author

Choose a reason for hiding this comment

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

See #687

@pllim pllim mentioned this pull request Jun 23, 2021
8 tasks
@pllim
Copy link
Contributor Author

pllim commented Jul 6, 2021

As discussed between @PatrickOgle and I on 2021-07-06, we removed click_center, click_drag, and scroll_pan from MVP. PO did not want API attributes that change GUI interactive behavior.

raise NotImplementedError

@property
def click_center(self):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note to self: In an offline conversion with @PatrickOgle , we have removed click_center and click_drag from MVP, as one can just use the pan/zoom button.

@pllim
Copy link
Contributor Author

pllim commented Aug 5, 2021

All the MVP API have been implemented and you can see the PRs linked to this one, so I am closing this meta PR.

@pllim pllim closed this Aug 5, 2021
@pllim pllim deleted the have-you-seen-my-astrowidgets-duckling branch August 5, 2021 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JDAT-1228: Implement Astrowidgets API in Imviz Helper
2 participants