Skip to content

Add multi-scale TS image computation - #234

Merged
adonath merged 3 commits into
gammapy:masterfrom
adonath:ts_computation_multiscale
Feb 5, 2015
Merged

adonath merged 3 commits into
gammapy:masterfrom
adonath:ts_computation_multiscale

Conversation

@adonath

@adonath adonath commented Jan 24, 2015

Copy link
Copy Markdown
Member

I now there is still a bit of work to be done here (put the script in a main function etc., change to back astropy.nddata.utils.extract_array, docs missing...), however I think its ready for a first review.

Comment thread gammapy/detect/test_statistics.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Add one-line description what this function does.

@cdeil

cdeil commented Jan 24, 2015

Copy link
Copy Markdown
Contributor

I've left some stylistic comments inline.

You need to fix the tests:
https://travis-ci.org/gammapy/gammapy/jobs/48174547#L2459

Once that passes and these little things are fixed it's up to you when you want to merge.
I'm working on spectra and gammapy.data classes, so no rush from my side.

It would be nice if you moved the script to gammapy/scripts and put it in functions so that it's re-usable and shows up in the docs ....

Comment thread gammapy/detect/test_statistics.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why did you change this?
I think the old version is the correct one that creates a HTML link and the new one doesn't?
(see https://gammapy.readthedocs.org/en/latest/development/index.html#where-should-i-import-from)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I had merge conflicts and just copied the files, I guess that's where this "backward" changes come from. Thanks for the comments so far! I will address them soon and also add an example to gammapy-extra.

Comment thread dev/ts_image.py Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If this is brand-new code, is it not dangerous to ignore astropy depreciation warnings? If you use a feature that's deprecated already, there is a good chance it will be removed in one of the next astropy versions.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agreed ... since we only support Astropy 1.0 (master at the moment) in Gammapy it should be possible to write code that doesn't raise any deprecation warnings.
@adonath If you get deprecation warnings from unrelated parts of Gammapy you don't have to fix them in this PR, but please don't silence them either.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, there were unrelated deprecation warnings and I included this local fix to have a clean output of the command line tool, when I was testing. Just forgot to remove it...Thanks!

@adonath
adonath force-pushed the ts_computation_multiscale branch 4 times, most recently from 1a0298a to 2bab6fb Compare January 29, 2015 16:40
Comment thread gammapy/detect/test_statistics.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Change to:

ValueError('Unknown morphology: {}'.format(morphology))

@cdeil

cdeil commented Jan 30, 2015

Copy link
Copy Markdown
Contributor

I've left some cosmetic inline comments ... this looks good to me know, but tests should be added and if possible the peak finder from photutils should be used.

Feel free to merge this yourself next week!

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.

3 participants