GithubHelp home page GithubHelp logo

rm-tools's Introduction

RM-Tools: Software to analyse Faraday rotation

Python scripts to perform RM-synthesis, RM-clean and QU-fitting onpolarised radio spectra.

IMPORTANT: the actively developed RM-tools directory has moved. RM-tools can now be found at

https://github.com/CIRADA-Tools/RM

Further development of RM-tools will take place in that repository, so all feature requests, bug reports, and other communication should be done there. This repository will no longer be updated. The main branch contains the last update of the Python 2 version of RM-tools, while the CIRADA branch contains the Python 3 version as of May 2019.

RMtools_1D ... 1D utilities to analyse Faraday spectra. RMtools_3D ... 1D utilities to analyse Faraday spectral cubes. RMutils ... Core functions used by the analysis utilities.

IMPORTANT NOTE: The master and develop branches of RM-tools are no longer being actively maintained. The cirada branch has been updated to Python 3; the master branch has been left for Python 2 compatability but will not receive updates except for critial bugs (at our discretion). The most recent version of the cirada branch can be found at the new repository linked above.

Questions, bug reports, and feature requests can be sent to Cameron Van Eck, cameron.van.eck (at) dunlap.utoronto.ca.

More information on the Canadian Initiative for Radio Astronomy Data Analysis (CIRADA) can be found at cirada.org.

rm-tools's People

Contributors

cameron-van-eck avatar ciradajp avatar crpurcell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

rmck1 matthewja

rm-tools's Issues

Issue with 2D arrays and RM-CLEAN

For 2D arrays (e.g. HEALPIX), I think there is a bug currently present in RM-CLEAN. Specifically, in util_RM.py -> do_rmclean_hogbom, lines 504 and 505. Currently, they read:

elif nDims==2:
        dirtyFDF = np.reshape(list(dirtyFDF.shape[:2])+[1])
        RMSFArr = np.reshape(list(RMSFArr.shape[:2])+[1])

This is syntactically incorrect for np.reshape. I think they should be:

elif nDims==2:
        dirtyFDF = np.reshape(dirtyFDF, list(dirtyFDF.shape[:2])+[1])
        RMSFArr = np.reshape(RMSFArr, list(RMSFArr.shape[:2])+[1])

Following this, in the main loop (i.e. lines 546+) there is an issue with the indexing of 2D arrays. I found that for a 2D array of shape (N_phi_Chan, N_pix), as produced by RM-Synthesis, the indexing variables xi and yi were not in the correct order for lines 586-588, specifically:

# Restore the CC * a Gaussian to the cleaned FDF
  cleanFDF[:, yi, xi] += \
  gauss1D(CC, phiPeak, fwhmRMSFArr[yi, xi])(phiArr_radm2)

That is, for fwhmRMSFArr the order was flipped. I was able to temporarily sidestep this issue by replacing this line with:

# Restore the CC * a Gaussian to the cleaned FDF
  cleanFDF[:, yi, xi] += \
  gauss1D(CC, phiPeak, fwhmRMSFArr.T[yi, xi])(phiArr_radm2)

But, this seems like it might be missing the underlying issue.

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.