Giter Club home page Giter Club logo

stginga's Introduction

stginga

Zenodo badge

Documentation Status

Github Actions CI Status

Powered by Astropy Badge

Ginga products specific to STScI data analysis.

stginga's People

Contributors

bsipocz avatar dependabot-preview[bot] avatar dependabot[bot] avatar ejeschke avatar eteq avatar obi-wan76 avatar pllim avatar rendinam avatar saogaz avatar stscieisenhamer avatar zacharyburnett avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stginga's Issues

Different DQ mask colors

@bhilbert4 can elaborate further or correct me here.

  1. Mark each DQ value in different color. But where do we draw the line, as there are only so many colors you can overlay before overcrowding the display? How to handle pixels with multiple DQ flags?
  2. For a given DQ value, plot number of affected pixels across the ramps. See #40.

Region info

  • Find how to get to plugins
  • Check if MultiImage is active and hook
  • Provide the common region to both, with WCS.

Setup options

  • WCS or pixel space
  • Region modes: Edit, Move, Delete
  • Instructions (again)
  • Administration buttons (close, etc.)

Load button for BackgroundSub plugin

Add a "Load" button to load parameters from previously saved JSON file. However, it does not make sense to load image path nor background value, which should be re-determined based on currently active image.

MultiImage workflow changes

As per #32, will change the workflow as follows:

  • MultiImage becomes a global plugin, and is started at any point
  • To add an image, an explicit keystroke is needed.
    • Option to add automatically.
  • Where the image comes from is irrelevant
  • To cycle through the images, a different set of keystrokes, or overload of the arrow keys, will cycle through the JUST the images added to MultiDim, as long as that plugin has focus. Again, the cycling would cross channels if necessary.
  • Make images removable.
  • The image in the main viewer does not actually have to be part of the stamps. <- Need to think about that.

Steps for implementation

  • Make plugin global (#96)
  • Add manual addition
  • Override arrow keys for cycling.
  • Implement #30

DQInspect gives IndexError when cached coords are invalid for another image

DQInspect saves the current X and Y positions in self.xcen and self.ycen. Given that Ginga can concurrently display images of different sizes, the coordinates may be invalid when user switches to another (possibly smaller) image. When this happens, the following traceback will appear:

2015-11-24 15:43:05,497 | E | GwMain.py:74 (update_pending) | gui error: index 1903 is out of bounds for axis 0 with size 800
2015-11-24 15:43:05,499 | E | GwMain.py:78 (update_pending) | Traceback:
  File ".../ginga/gw/GwMain.py", line 69, in update_pending
    res = future.thaw(suppress_exception=False)
  File ".../ginga/misc/Future.py", line 36, in thaw
    res = self.method(*self.args, **self.kwdargs)
  File ".../stginga/plugins/DQInspect.py", line 332, in redo
    pixval = data[int(self.ycen), int(self.xcen)]

This can be recreated by opening two images with different dimensions (say, one fullframe and one subarray). Start the plugin. Set X and Y positions to a place on the fullframe that would be out of range for the subarray. Switch display to subarray.

This can also be recreated by just selecting X and Y positions that are out of range on the same image.

Suggested solution 1: Automatically set the offending coordinate to max allowed value based on the size of the newly selected image. (What if user is angry at losing the existing values?)

Suggested solution 2: Issue an error a warning message in the log and do nothing.

MIPick should subclass Pick

Right now MIPick is a copy of Pick with some minor changes. I would suggest subclassing Pick instead. I noticed while testing MIPick the other day that it is already missing some of the enhancements and updates to Pick, like the radial plot curve fit.

We subclass a lot of the standard plugins here at Subaru in order to customize them for our specific observation workflow. It works pretty well. Occasionally we need to modify the "core" plugin to add a callback or to expose a structure so that it can enable some functionality in the subclass. Generally this can be done in a pretty non-invasive way. Very occasionally the subclass has such radical changes that it becomes better to disentangle them by copying the relevant parts of the core plugin and skipping the subclassing, but I would say that in the current form MIPick isn't fundamentally different.

Switch to astropy affiliated package template?

This is not particularly critical because things are currently working fine... But we might want to consider switch to the affiliated package template for stginga - it makes it easier to manage a variety of things like tests/doc improvements/etc.

Lock WCS of main viewer

Pending discussions with ginga core itself, provide option to lock the main viewer to a particular region, not necessarily the postage stamp region.

Use ChangeHistory in Ginga and remove local copy

This is only relevant if ejeschke/ginga#270 is accepted and merged.

This effectively moves the ChangeHistory plugin to Ginga core distribution. Hence, we should delete the version currently in stginga and use the one from Ginga instead. Our setup codes also need to be updated as well.

Fix and improve SNR plugin

This is a follow-up of #72.

  • Turn minimum SBR limit into user preference (currently hardcoded at zero, which is pretty useless). Enable updating and logging it within redo(). Some thoughts need to go into this, as the limits can be quite operation/instrument specific.
  • Add option to only calculate using good pixels, both as user perference and GUI checkbox (like #38).
  • Add buttons to save/load parameter values (like #37).
  • Figure out whether ejeschke/ginga#266 is really an issue for this plugin or not (probably not if user can save parameters to JSON files).
  • Update example config file.
  • Add usage info and screenshot to plugins.rst

cannot interact with box: always panning

In MultiImage, MIPick, or Pick, the box cannot be interacted with. The main image is always in pan mode. The one way I have found is to hit the 'd' key. This should bring up the distribution algorithm choosing, but instead allows moving and editing of the box.

It doesn't matter what mode is chosen: move, draw, or edit.

Notes

  • With latest master of ginga (23Nov2015)
  • OS X with trackpad

Implement SNR calculation plugin

Move SurfBgRatio plugin from QUIP to stginga. Probably will also rename it to something more sensible like SNRCalc. Basically it calculates simple signal-to-noise ratio (SCI / ERR) and surface-background ratio (as defined by Ball), with the option to write the results to image header as keyword-value pairs.

BackgroundSub does not calculate background

When I load an image and draw an annulus, the X and Y values update, but not the Radius or Annulus Width boxes. Also, the Background Value box does not seem to change (not calculated). The log does not show any errors. The Subtract button remains grey throughout.

This may be user error, if I am not understanding the plugin operation correctly. I am using stginga commit 05e0777 with ginga commit 91b05b0a9e39f0fa9c3ac9f1589bc4640d91c15f.

Background calculation to ignore bad pixels

Background value should be calculated only from good pixels (i.e., pixels marked as "good" in the associated DQ extension). If no good pixels found, set to zero.

To be more flexible, this should be configurable via ~/.ginga/plugin_BackgroundSub.cfg file, with default set to True. Maybe something like:

ignore_bad_pixels = True

Extend LineProfile to accept aperture

Extend LineProfile local plugin (by subclassing) to also accept some kind of aperture (e.g., quadrant, circle, box, etc.). Some kind of statistics (e.g., mean) is to be performed for all pixels within the aperture for a given extension. And then the results are plotting across the ramps (i.e., time).

For the quadrant and time tags to work, JWST-specific assumptions are needed. Can probably make those configurable as well.

Originally brought up by @bhilbert4 #35.

Also see ejeschke/ginga#259.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.