Skip to content

[WIP] Moment errors#40

Open
e-koch wants to merge 9 commits intoradio-astro-tools:masterfrom
e-koch:moment_errors
Open

[WIP] Moment errors#40
e-koch wants to merge 9 commits intoradio-astro-tools:masterfrom
e-koch:moment_errors

Conversation

@e-koch
Copy link
Contributor

@e-koch e-koch commented Nov 22, 2016

cube- and slice-wise moment error functions and accompanying tests.

Verified against https://github.com/jfoster17/ramps/blob/master/reduce/idl_stats.py#L56, which is verified against @low-sky's IDL code (which means it's free of bugs, right? 😁 ).

Another version of this will live in TurbuStat, until this package is a bit more ready (whenever that will be).

# Remove velocity offset to match cube._pix_cen
# Requires converting to a Quantity
moment1 = u.Quantity(moment1)
moment1 = u.Quantity(moment1.copy())
Copy link
Contributor

Choose a reason for hiding this comment

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

making it a Quantity doesn't automatically copy the data? I guess I didn't realize that. It might be better to have copy=True as a parameter, since that's default for, e.g., np.array

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I assumed it didn't automatically, so I'll go back and check if this is needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, it's automatically copied.

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