richteague / bettermoments Goto Github PK
View Code? Open in Web Editor NEWA robust way to calculate line-of-sight velocities.
License: MIT License
A robust way to calculate line-of-sight velocities.
License: MIT License
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.
Given an analytical line profile and an achieved SNR determine the optimal velocity resolution for calculating the line centroid. Should be useful for proposals. @ryanaloomis
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
?
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`.
As title.
Header is hardcoded to only return ICRS coordinates, despite not applying any conversion.
Can't use the defined entry_points in setup.py
as for Python 3.
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...
I'm happy for this to go in.
Will you submit to AAS and ArXiv?
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.
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.
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?
@richteague: can you add the figures to the git repo so that we can make the paper from a checkout?
So close @dfm!
If creating moment maps using analytical fits, have an option to additionally return a restored model cube.
Appendix C of: https://arxiv.org/abs/astro-ph/9709201
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.