A commandline tool to rotate FITS cubes.
This was mostly a project to help me learn Rust, but it does have a useful purpose. I've taken inspiration from Miriad's reorder command.
When reading FITS data from disk the last (FITS-ordering) axis is the slowest to read. Typically, the frequency axis is placed last. This results in slow operations along the frequency axis. One can get a nice speed up in such operations, such as RM-synthesis, by rotating the FITS cube to place the frequency axis first.
You can install the release version using Cargo:
cargo install fitsrotate_rs
For the latest version, you can clone this repository and build it locally:
git clone https://github.com/AlecThomson/fitsrotate_rs.git
cd fitsrotate_rs.git
cargo install --path .
On the commandline:
❯ fitsrotate_rs -h
Rotate FITS images
Usage: fitsrotate_rs [OPTIONS] <FILENAME> <MODE>
Arguments:
<FILENAME> The FITS file
<MODE> Mode of rotation - a sequence of integers specifying the order of the axes (e.g. 321 for a 3D cube)
Options:
-o, --overwrite Overwrite the FITS file if it already exists
-h, --help Print help
-V, --version Print version
To use the crate in your own Rust development, add the following line to your Cargo.toml
:
[dependencies]
fitsrotate_rs = "0.1.1"
Contributions are very welcome! As stated above, this has been a learning project for me, so please forgive any major blunders.
MIT