Skip to content

The purpose of Magic2 is to interpolate and help in the analysis of traced out interferograms, mostly for the purpose of plasma physics research.

Notifications You must be signed in to change notification settings

MAGPIE-ICL/Magic2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magic2.1

A new release version of the Magic2 code.

  • In the version Magic2.0, scipy was used to handle numpy arrays. New version of Python 3 requires the use of Numpy Package instead.

Magic2 is a re-written code of the original Magic by George Swadling, done by Jakub Dranczewski during a UROP in 2018.

The purpose of Magic2 is to interpolate and help in the analysis of traced out interferograms, mostly for the purpose of plasma physics research. It also has many functions assisting in the processing and inspection of the obtained data. It is also a fully independent Python library that can be used with other code in headless mode (no GUI).

Getting help

help.html in the main catalogue of this project contains all the information you should need to use the GUI of Magic2.

All of the code is heavily commented, so it shouldn't be very hard to understand.

Running the software

Run main.py in the Python distribution of your choice or double click Magic2.bat. You need Python 3.x and a few additional libraries: scipy, matplotlib, and skimage. Those should be installed alongside Python if you use an Anaconda distribution.

What's the difference between Magic2 and Magic?

  • Magic2 is the sequel written in Python instead of Matlab, which means it doesn't require proprietary software to run.
  • It's faster - both in normal operation and interpolation.
  • It's more streamlined - with a few user interface improvements that should speed up your workflow.
  • It's got better lineouts - they're really cool, try them!
  • It's got its own file format, which allows you to store all the important data for a shot in around 200KB for easy safekeeping and circulation.
  • It's got a few new functions, and most of the old ones.

The structure of this repository

There are two main branches: master is the stable branch, you can always grab the most recent release from here. The release history can also be found here. dev is used for development, features, and fixes that are being built live there - it's often unstable. docs is a long forgotten branch that was used to kickstart the documentation.

Using Magic2 as a library

Magic2 is capable of running in headless mode (without GUI). See main_old.py for reference, it contains the entire flow of the programme without putting it all in a window. To import a Magic2 module, use the normal Python import syntax:

import magic2.triangulate

or, to make referencing easier:

import magic2.triangulate as m2triangulate

You have to have the magic2 folder in a place where Python can find it, either in the same directory as your code, or in a folder that is in your PYTHONPATH.

Bear in mind that while Magic2's functions and classes are general, they will expect the data you provide them with to have a particular structure.

About

The purpose of Magic2 is to interpolate and help in the analysis of traced out interferograms, mostly for the purpose of plasma physics research.

Resources

Stars

Watchers

Forks

Packages

No packages published