Coder Social home page Coder Social logo

astroimagej / astroimagej Goto Github PK

View Code? Open in Web Editor NEW
12.0 4.0 10.0 25.54 MB

Home Page: http://astroimagej.com

License: GNU General Public License v3.0

Java 94.58% HTML 5.31% CSS 0.01% ImageJ Macro 0.01% Shell 0.04% Velocity Template Language 0.06%
astronomy astrophysics java gui-application

astroimagej's Introduction

AstroImageJ

Merged project of Dr. Karen Collins' AstroImageJ.

Developer Instructions

General Use

Clone the repo locally, then run gradlew packageAij[For<Your-OS-Here>] (leave off what is in square brackets to generate all of them) in the repo's folder. The built zip(s) will appear in your-project-root/build/distributions. To build only ij.jar or astronomy_.jar, run gradlew :ij:build or gradlew :Astronomy_:build, respectively.

To run AIJ, use gradlew aijRun. The generated directory, AIJ-Run, will contain the generated version of AIJ.

Special Options

The tasks copyBuiltJars and runAij are configured through text files in the project root, jarLocation.txt and devLaunchOptions.txt, respectively. Both files are ignored by git and will not be commited to the repo. Spelling and case sensitive.

jarLocation.txt contains the absolute path to an AIJ distribution, so that development builds can be tested on a medium-term basis without using Gradle or and IDE to update it each time. When developing in Intellij Idea, if this file is present, the copyBuiltJars task will be run automatically when the hammer icon is clicked.

devLaunchOptions.txt contains the Java launch arguments, eg. -Xmx5000m -Xms256m, the same as the config file AstroImageJ.cfg does for normal installations of AIJ. If present, these options are used in place of the defaults for runAij.

Use in Intellij Idea:

In Idea, go to File > New > Project From Version Control (If it has not opened to a project, select 'Get from Version Control' on the Welcome window.) Enter https://github.com/keastrid/astroimagej for the URL, and direct the path to where you want the project, then click 'clone'. If you had a project open, it will ask you which window to open AIJ in, choose your preference.

Once open, it may notify you that it doesn't have a JDK - if that is so, click the bar and point AIJ to your JDK, or you can have it install one for you.

On the right-hand side, you will see a button labelled 'Gradle' with a little elephant on top. Clicking it wil open the Gradle sidebar. Navigate to AIJ-Merged > Tasks > build > astroimagej development. Double-click on runAij to build and run the project. To build the project, double-click on any of the packageAij tasks. The built zip(s) will appear in your-project-root/build/distributions. To build only ij.jar or astronomy_.jar, navigate to the build commands under their respective modules (instead of Tasks > ..., it will be ij > ... or Astronomy_ > ...). The built jar will be in your-project-root//build/libs.

astroimagej's People

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

astroimagej's Issues

Read of 32-bit int FITS Files as floating point

While the FITS_Reader receives a correct pixel array for the ImageType, the resulting ImagePlus/Processor displays highly skewed values.

This is not the case when a 32-bit int image is created (such as with the PhotometricDebayer, when ImageType is returning an IntProcessor).

For now, these images are read in as floating points, similar to the 64bit counterparts.

Handle other FITS image datatypes

  • Open double precision floats as double precision floats

    • Currently, opening of double precision float fits images opens them as single precision due to lack of a DoubleProcessor in IJ.
  • Open 64-bit integer images BITPIX=64

    • Needs a FileInfo value for rendering, could use the existing FileInfo.GRAY64_FLOAT

Cache runtime metadata for packaging

Currently, the package tasks rely on querying Azul to bundle a runtime. This prevents runtimes from being bundled when offline, and causes frequent queries.

  • Save the metadata to a json in jres folder
  • Use the metadata file for the packaging tasks
  • Only periodically check for updates (~3 month timescale or more frequent)
    • Provide task to force metadata update

Zooming on image window with trackpad pans the image

When zooming on an image window, the image will drift up and to the left constantly. This is contrary to scrolling with a mouse wheel, which does not drift the image.

This issue is known to effect windows and mac, and potentially linux.

Add new plot objects to MP

MP does not have access to all plot objects and shapes
Also add the rendering to the vector plot saving

Image Contrast Problems with "Update auto-contrast thresholds when histogram range is changed"

I normally see it when MA is running, but I don't think I've seen it when simply using the stack play/animate mode. Using this partially clouded image stack, it seems that sometimes the contrast get off the peak of the histogram in some images. You may even be able to use the last 20 or so images.

To see the problem, download the linked stack, run MA with a single aperture on the middle star (probably doesn't matter which one or how many). I'm using these contrast settings and a non-virtual stack:

ihhefhpfdfapopfc

At the end of the run, the image looks like the first one below, which is much darker than the starting setting. The setting is shown in the histogram below the image. You can compare to what the final image looks like in v3.4 with the same settings, which displays as expected.

bnllhajnfkofecen

Simply clicking the auto-contrast icon above the image () returns the image display to the expected contrast (or scrolling the stack), but notice that the histogram is almost the same as above. I think possibly the contrast setting might be from the previous image, even though the histogram display is correct. The quickly changing clouds might be causing an underlying problem to show visually.

Here's the image after clicking the auto-contrast button:

kacnapncednjkblp

Allow AIJ to update bundled JRE

For the purposes of avoiding reinstalls, allow AIJ to (optionally) update the bundled JRE
Requires an "elevator" to run after the current JVM closes to update it.

Multisized aperture MA

Measures the same star multiple times with different aperture sizes

  • GUI hookup in MA setup
    • Range of aperture sizes (based on current nominal radius setting, manual or automatic)
      • Provide toggable auto suggestion of 3-5 other radii in both directions
  • New columns in data table
  • Comp. suggestion's photometry may need to be updated to handle this?
  • Ability to optimize over star size
    • part of comp. opti. dropdown?

Add stable API package for macros/plugins

This should precede #27.

Currently, AIJ make no separation between API surface and internals, making macros and plugins that depend on AIJ fragile to its updates, as any change in behavior or method signature could cause them to break. IJ's apparent solution to this is restricting macros to public static members, a restriction since removed by us to deal with lack of API surface in AIJ. AIJ internals are also largely undocumented, serving as a barrier to macro and plugin development, in addition to the limitation of only allowing static calls.

Creating a unified, mid- to long-term stable, and well documented API would greatly aid macro and plugin developers.

Proposal

  • Create a unified, versioned package, such as com.astroimagej.api.v1, to contain all of the API
    • Breaking changes will require a vN+1 package, allowing for the vN package to remain for some time after its replacement is made
  • Provide a version number for the API, separate from AIJ's, to allow plugins/macros to make decisions on if/how they run
  • Provide a way to check and log usage of deprecated API members
  • Provide static members that are capable of accessing instance members, greatly increasing the amount that macros can do

Nongoals

  • Removal of the ability for macros/plugins to touch AIJ internals, they will do so will the knowledge that an AIJ update may break the macro/plugin, possibly without warning

This needs to be communicated with plugin/macro developers, and API additions will largely depend on what they need.

Update scripting capabilities

  • Remove user-facing parts for python scripting
  • Find and implement a replacement for Nashorn since it was removed from Java for IJ's javascript scripting system

Revise old debayering plugin

  • Handle the FITS keywords
  • Rename options to their more-sensible superpixel patterns
  • Handle bayer patterns better (share some code with photometric debayer?)

Add MCMC FItting

  • In fit panel, as its own subpanel
  • Runs after "adequate" bestfit model is found
  • Threaded
  • See EXOFASTv2 DEMC routine

All function to be set in MP before selecting a dataset

  • Enable selecting a function before a dataset
  • Enable function before selection of an operand
  • Ensure that a function and Y-Operand are set for all points in the functions domain

Current behavior resets the function to None when Y-Operand changes.

Speed up platesolving

  • Find alternative to astronmetry.net solving
    • ansvr is Windows only
  • External program interface is ok

Don't truncate or round data in tables

  • Change how manual trimming in MP rebuilds the table from the TextPanel, truncating and rounding all values
  • Some values added to the table by MA and AP are rounded when they are added
  • Save full data to file, not the TextPanel contents
  • Keep display with rounding/truncation the same (the above changes are only for the internal table representation)

Shifting Bottom Plot Elements

When scaling the plot (heights 500 - 1500), the ingress, egress, left and right markers along with their values, and version number shift vertically (relative position is not kept).

Cannot open zip file of FITS images

Dragging a zip file containing multiple FITS images does not open them, instead crashing.

Requires more background changes as the zip opener only opens the first file it finds, not multiple into the same stack.

Scrollbar in stack window segmentation

On windows, the scrollbar for the stack window will track the cursor as it is dragged, not locking to where the region of the bar where the currently displayed image is. Once some threshold is cross, the bar will "jump" to the new region before tracking the cursor again.

On mac the segmentation is handled properly.

Platesolving single slice of a stack results in broken icon

I've noticed this for a while, but could determine exactly what caused the problem, but now I see the scenario as follows:

Open a stack.

Plate solve only a single image in the stack by disabling "Process Stack":
image

When the plate-solve is successful and finished, the plate-solve icon stays "depressed":
image

Clicking on the plate-solve icon to attempt to stop the plate-solve and return the icon to the "undepressed" state results in this error message:
image

Stack Window un-maximize (restore down) results in loss of image decorations

After an image has been maximized, un-maximizing (or restore down) under windows causes a loss of some the image display. Expanding the size of the image slightly by dragging an edge returns all of the information. Fix un-maximize so that the stack display is still correct without requiring the window size change. This happens under windows but needs to be tested on other platforms.

Make Fittings Panel 'b' (impact parameter) box "Lock"-able

The impact parameter ('b') text field should be made "Lock"-able by adding a checkbox inside the 'b' value panel. Maybe add the checkbox to the right of the 'b' text field so the it will nearly align with the other Lock checkboxes above. If b is locked, then the b text box should be editable, while inclination should be forced to the locked state, but unlike the normal inclination lock state, the inclination text box should be made not editable. In this mode, the inclination value will be automatically set to inclination = arccos (b /(a/r*)). While the inclination will be locked (i.e. not fitted), it's value will depend on the value entered for b, and the fitted value of a/r* (or the fixed value of a/r* if it is also locked).

TICA FFI BJD_TDB timestamp is actually JD_TDB

The TICA FFI BJD_TDB timestamps are actually JD_TDB instead of the currently labelled BJD_TDB. JD_TDB needs to be converted to JD_UTC and ideally added to the headers as DATE-OBS in the standard FITS DATE-OBS format.

Stack window maximization change of behavior

When maximizing the stack window, the image currently fully fills the screen and crops the edges as needed. Change behavior to have image file the screen from top to bottom, but keep the full image with white space on the sides as needed. The user may then zoom in further into the image if needed.

Maximize and un-maximize on Mac is flaky

The right-hand edge of the window is clipped when maximizing on MacOS. After an image has been maximized, un-maximizing (or restore down) under MacOS sometimes causes a loss of some the image display. Expanding the size of the image slightly by dragging an edge returns all of the information. Fix un-maximize so that the stack display is still correct without requiring the window size change.

Process name is not "AstroImageJ"

On Windows, the process name is simply the active JRE's name.
Potentially effects mac and linux.

Requires changes to packaging to be possible.

Change font size in plot

  • axis labels
  • tick labels
  • legend

To improve PDF export when used in publications.

Stretch: include the text as text and not vectors.

Stack scroll lag on macOS

When scrolling a stack on a mac, the stack does not update as frequently as it does on windows. This issues also affects multiaperture runs on mac.

GUI Rework

A review and rework of the GUI on the Astronomy_ side of AIJ is needed, to optimize and get a better grasp on the threading issues experienced in the V5 update. This can occur during the headless/GUI split.

Goals

  • Eliminate the threading issues
  • Optimize the rendering
    • Don't redraw whole window for component update
    • Reduce needed draws
  • Split the processing and GUI
    • Allows for headless operation
      • Improved scripting over macros
      • Automated tests via github actions/gradle

Cannot open "table" FITS images into a virtual stack

When attempting to open a folder of table FITS images, such as TESS or TICA FFIs, the images fail to open when "use virtual stack" is enabled.

Changes to how FolderOpener works are likely needed, but more investigation is needed.

This also affects 3D images. In 1.47, IJ would show an error for this, but that was removed in a later version.

TODO log a message that 3D/table images are incompatible with virtual stack

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.