GithubHelp home page GithubHelp logo

bettermoments's Introduction

bettermoments




Measuring precise line-of-sight velocities from Doppler shifted lines is essential
when looking for small scale deviations indicative of, for example, embedded planets.
Do that with bettermoments.

DOI ascl:1901.009 Documentation Status



Installation

To install, we recommend using pip:

pip install bettermoments

Usage

The easiest way to interface with bettermoments is through the command line. To use the default quadratic method simply use,

bettermoments path/to/cube.fits

while various other methods, discussed further in the documentation, can be accessed via the -method flag:

bettermoments path/to/cube.fits -method zeroth

A quick

bettermoments --help

will give a quick overview of what options there are.

Documentation

More information can be found in the documentation.

bettermoments's People

Contributors

codacy-badger avatar dfm avatar iancze avatar mirca avatar richteague avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

bettermoments's Issues

command line option 'outname' is ignored

After installing the newest version 1.6.1, it looks like the -outname option is ignored. In other words, even when specifying -outname, the output moment 0 maps' names are based on the input cubes' names. Furthermore, they are saved in the same directory as the input cube, so it seems no longer possible to specify the location where the output maps should be saved.

Submit!

I'm happy for this to go in.
Will you submit to AAS and ArXiv?

fits header key 'date-obs' not preserved

It looks like the 'date-obs' keyword in the headers of the moment 0 maps are set to some default value (1858/11/17/00:00:00). Would it be possible to pass along the 'date-obs' from the header of the input cube to the header of the output moment 0 maps?
It wonder where this 1858/11/17/00:00:00 date comes from. Maybe this is astropy's fits.writeto with output_verify='silentfix'? However, I tried output_verify='exception', and it still put that default date into the header without raising an exception.

Default clip

Just following on from our conversation - I think it would be more intuitive to have the default clip set at zero sigma (i.e. the call when no "-clip" is set at all to revert to "-clip 0" rather than "-clip 5" as is), or have it explicitly written out that it's using 5 sigma somewhere...

installation woes

would be useful to add an installation note, since imgcube isn't something available in an obvious way. Not via pip, but
git clone https://github.com/richteague/imgcube
inside of the notebooks directory make it work.

Had to comment out the plt.style.use('paper') My anaconda didn't have it. Now looks awfully small, what's the trick to get it working with 'paper' option?

Channel width in the zeroth moment maps

I think the variable chan in methods.collapse_zeroth should be a positive value in case that velax is a decreasing sequence, i.e.,

chan = abs(np.diff(velax).mean())

Otherwise, the zeroth moment values (M0) and their uncertainties (dM0) will have opposite signs.

Error without outname option in command line

Dear Rich,

I installed the latest version and run in command-line without -outname option, but I got an error saying AttributeError: 'str' object has no attribute 'copy' at line 264 in io.py. Maybe path.copy() should be simply path ?

AssertionError: Unexpected shape of `moments`.

Hi,
I'm attempting to make a moment 9 cube fits but I get the error above. Here's my current usage of bettermoments:

bettermoments cube.fits -method ninth -clip 4 -firstchannel 5 -lastchannel 64

Out:

Loading up data...
Loading up user-defined mask...
Defining channel-based mask...
Smoothing the data...
Estimating noise in the data...
Estimated RMS: 9.82e-04.
Calculating threshold-based mask...
Masking the data...
Calculating maps...
Saving maps...
Traceback (most recent call last):
  File "/home/bnorfolk/anaconda3/envs/py38/bin/bettermoments", line 8, in <module>
    sys.exit(main())
  File "/home/bnorfolk/anaconda3/envs/py38/lib/python3.8/site-packages/bettermoments/collapse_cube.py", line 439, in main
    save_to_FITS(moments=moments,
  File "/home/bnorfolk/anaconda3/envs/py38/lib/python3.8/site-packages/bettermoments/io.py", line 258, in save_to_FITS
    assert moments.ndim == 3, "Unexpected shape of `moments`."
AssertionError: Unexpected shape of `moments`.

clip does not use the input rms

When using clip, the mask is calculated using the automatically calculated rms rather than the input rms. I notice this as the mask does not change if I change the input rms. I am using the command line interface.

Return model cubes

If creating moment maps using analytical fits, have an option to additionally return a restored model cube.

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.