Giter VIP home page Giter VIP logo

zeeman_modelling's Introduction

Zeeman_modelling

About

This command line program written in Python aims to standardize and automize the Zeeman anlaysis process in emission line radio astronomy through robust curve fitting and Bayesian-based parameter sampling. We hope to minimize user bias in the study of interstellar magnetic fields through this software solution.

Getting Started

  • Clone this repository.
  • It is highly to conduct the following installation in a clean environment. Could be conda, mamba, or venv.
  • cd into the cloned folder and enter the following command:
pip install .
  • cd into the directory where the Stokes I and Stokes V cubes are and call the program by:
zeeman_modeling FILENAME_STOKESI [FILENAME_STOKESV] XPIXEL YPIXEL [OPTIONS]
  • see detailed options and examples below
  • To verify correct installation, run:
zeeman_modeling -h
# or
zeeman_modeling --help
  • Expected output
usage: zeeman_modeling [-h] [--mapping MAPPING [MAPPING ...]] [--output OUTPUT] [--justI] [--vel] [--init] [--trace]
                    [--corner]
                    filename [filename ...] pixel pixel

Zeeman analysis and fitting

positional arguments:
  filename              Filename of the Stoeks I and Stokes V FITS file to be analysed
  pixel                 Pixel coordinates of the region to be analysed

options:
  -h, --help            show this help message and exit
  --mapping MAPPING [MAPPING ...]
                        Number of Gaussian components to fit each visible peak
  --output OUTPUT       Output directory
  --justI               Only fits Stokes I
  --init                Visualize the position of initial guesses
  --trace               Plot trace plots
  --corner              Plot corner plots
  --absorb              Absorption spectrum input
  --sensitivity SENSITIVITY
                        Sensitivity in peak finding

Usage

It is highly encouraged for users to see where the initial guesses by the –init option before proceeding to Stokes I and Stokes V fitting.

filename_I:filename of the Stokes I cube
filename_V:filename of the Stokes V cube, optional when using the --justI flag
pixel_x:x value of the selected pixel
pixel_y:y value of the selected pixel
-h, --help show this help message and exit
--mapping [MAPPING …] Number of Gaussian components to fit each visible peak
--output Output directory
--justI Conduct line fitting on just the Stokes I profile
--init Visualize the position of initial guesses
--trace Plot trace plots
--corner Plot corner plots
--absorb Conduct absorption Zeeman analysis
--sensitivity Sensitivity in initial peak find

Example

Visualize initial guess:

zeeman_modeling TestI.py TestV.py 64 64 --init

To fit Stokes I and Stokes V FITS cubes named 1720I.FITS and 1720V.FITS at pixel value x = 128, y = 128, one would pass the following line to the terminal. (Assuming there are two visible peaks in Stokes I profile and would like to fit each peak with two Gaussian components)

zeeman_modeling 1720_I.FITS 1720_V.FITS 128 127 --mapping 2 2

To also store the plotting results as well as corner plots and tracing plots to check for MCMC effectiveness, add the following arguments:

zeeman_modeling 1720_I.FITS 1720_V.FITS 128 127 --mapping 2 2 --plot --trace --corner

zeeman_modelling's People

Contributors

royh922 avatar preshanth avatar

Stargazers

 avatar Mehrnoosh Tahani avatar  avatar

Watchers

 avatar

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.