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

Major refactor of 2D filament finding #41

Merged
merged 123 commits into from
Mar 29, 2018
Merged

Major refactor of 2D filament finding #41

merged 123 commits into from
Mar 29, 2018

Conversation

e-koch
Copy link
Owner

@e-koch e-koch commented Jan 23, 2018

Maintaining the current code base is a huge pain. This PR is intended to make the code easier to work with by providing a new 2D filament finding class: FilFinder2D.

Also new is the Filament2D class. Instead of looping through operations on the filaments in an image, FilFinder2D defines a set of Filament2D objects, where the property finding routines are now located. This removes the need to drag along a set of arrays for each skeleton, as well as their offset positions, which fil_finder_2D is not handling correctly. #39 will be fixed by removing the need to add any padding. It also allows for operating on individual filaments for greater control of the analysis.

An on-going list of updates:

  • Found an issue where T-shaped intersections included in the longest skeleton path would not give the correct length since the T-shape remains 8-connected (change in shape of 2(sqrt(2) - 1) so highly unlikely to cause a large issue). find_filpix, where skeletons are split into pixel groups, was revamped to correctly account for this shape
  • Added consistent conversions for all pixel -> angular -> physical conversions (Use astropy.units  #7 )
  • Load directly from spectral-cube objects (well, 2D objects)
  • Keep brightness units attached to the data
  • glob_thresh redefined to be a data value, not a percentile of the data (easier to set based on the noise level)
  • Allow branches to be pruned by the length, the average intensity, or both (latter was the previously the only option)
  • The offset problem causes issues when building radial profiles. If the offsets are incorrect, the comparisons between the skeleton's distance array and the full image's distance array are wrong. This leads to some regions being omitted when building the binned profile. There isn't an easy fix for this in fil_finder_2D so a warning is added to avoid using the widths from this method.
  • FilFinder2D and Filament2D return astropy tables instead of offering functions to save tables. This is easier than trying to account for all of the different file formats.

To-do:

e-koch added 30 commits January 9, 2018 21:54
…ncluded in an intersection, keeping the intersection 8-connected across the T, and causing issues with the total path length
…eleton analysis. Move operations into dedicated Filament2D classes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants