Skip to content

Proposed affiliated package: statmorph - #315

Merged
eteq merged 2 commits into
astropy:masterfrom
vrodgom:master
Jan 22, 2020
Merged

eteq merged 2 commits into
astropy:masterfrom
vrodgom:master

Conversation

@vrodgom

@vrodgom vrodgom commented Apr 1, 2019

Copy link
Copy Markdown
Contributor

This package is a Pythonic reincarnation of Jennifer Lotz's IDL code for calculating non-parametric morphological diagnostics of galaxy images, such as the Gini-M20 (Lotz et al. 2004), concentration-asymmetry-smoothness (Conselice 2003), and multimode-intensity-deviation (Freeman et al. 2013) statistics. In addition, the code is quite good at fitting single-component 2D Sérsic profiles, a functionality powered by Astropy's modeling & fitting module. Finally, statmorph makes heavy use of the photutils affiliated package, so I think it would blend nicely with the rest of the Astropy ecosystem.

@astrofrog

Copy link
Copy Markdown
Member

Thank you for proposing this package to the Astropy affiliated package ecosystem! We will be asking a member of the Astropy project to review this submission and will get back to you once we hear back from them.

@eteq

eteq commented Jan 22, 2020 •

Copy link
Copy Markdown
Member

@vrodgom - thanks for your contribution, and sorry for the lengthy delay here - this review was done a while back but I just realized I failed to do the final step of actually posting it!

This package has been reviewed for inclusion in the Astropy affiliated package ecosystem by a member of the Astropy community as well as myself, and I have synthesized the results of the review here.

You can find out more about our review criteria in Reviewing affiliated packages. For each of the review categories below we have listed the score and have included some comments when the score is not green.

Functionality/Scope Specialized package
No further comments
Integration with Astropy ecosystem Orange
In utils.image_diagnostics.py, the astropy.visualization package is used awkwardly to display log-stretched images. It can be done simpler, and without the need for a custom normalize() function, which is similar to astropy.visualization.MinMaxInterval. astropy.visualization.simple_norm could also be used.

In statmorph.py, there are a few astropy equivalents that might be more appropriate:

scipy.ndimage.convolve -> astropy.convolution.convolve
scipy.signal.fftconvolve -> astropy.convolution.convolve_fft

There is a custom _mode() function that might be possible to replace with:
-> photutils.background.ModeEstimatorBackground or
-> photutils.background.SExtractorBackground

Aa well as a custom _quantile() function:
-> use numpy.percentile(...., interpolation='nearest')

All of these seem like straightforward changes, and with those changes this package could be updated to "green" integration status.

Documentation Orange
Overall, the documentation has a fair amount of content. It is available on Readthedocs. In lieu of narrative docs with minimal working examples, the package uses a jupyter notebook. While this is effective, it might be better to use a tool like nbsphinx to embed the notebook content in the docs themselves.

There is also a refereed paper that explains the calculations, which is an effective replacement for other detail that might have otherwise been in the docs.

However, there are a couple public functions that are missing API docs:
  • utils.normalize()
  • utils.get_ax()

These should be made private, or in the case of normalize(), replace
with astropy equivalents.

Testing Orange
Overall: 66% coverage statmorph.py: 80% coverage utils/image_diagnostics.py: 0% coverage

There are not any unit tests. Instead there is a single end-to-end regression test where it appears the truth values were obtained from simply running the code on an single galaxy image.

Additionally, there is no Continuous Integration running. A CI service like Travis would be desirable for this package to ensure the test suite continues to pass even with external contributions or the like.

Development status

Functional but low activity

There appears to be a single developer. There have been only 4 issues and 2 PRs, all of which are closed. There hasn't been relatively low but steady activity over the last 6 months.

Python 3 compatibility Green
The package is compatible with Python 2 and 3. The author should consider dropping support for Python 2 soon, as Python 2 is unsupported as of 2020.

Summary/Decision: This package meets the review criteria for affiliated packages, so we are happy to confirm that we'll be listing your package as an affiliated package! Keep up the good work, and we encourage you to improve on the areas above that weren't “green” yet.

If you have any follow-up questions or disagree with any of the comments above, leave a comment and we can discuss it here, or alternatively you can open an issue or PR to update your entry with an explanation why. Alternatively, at any point in future you can request a re-review of the package if you believe any of the scores should be updated - contact the coordination committee, and we’ll do a new review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants