Giter Club home page Giter Club logo

darpanx's Introduction

DarpanX: A Python Package for Modeling X-ray Reflectivity of Multilayer Mirrors

ascl:2101.015

DOI

DarpanX is a Python-3 package that provides functionality to compute reflectivity and other specular optical functions of multilayer/single-layer mirror for different energy and angles as well as to fit the XRR measurements of the mirrors. An API is provided for this and it is also implemented as a local model in PyXspec for fitting the experimental XRR measurements.

For more information regarding the DarpanX see:

Pre-requisites

Following python modules are required for the installation of darpanx :

 setuptools
 numpy
 scipy
 multiprocessing
 matplotlib
 tabulate

For the experimental data fitting, PyXSPEC (python version of XSPEC) is required.

Installation

The DarpanX package can be downloaded from the Github link- https://github.com/biswajitmb/DarpanX.git

After downloading it, go to the DarpanX directory:

cd DarpanX

To install DarpanX package system-wide:

sudo python3.x setup.py install

Usage

Open a python3.x shell like ipython

import darpanx as drp
import numpy as np

To create a multilayer object

m=drp.Multilayer(MultilayerType="SingleLayer",SubstrateMaterial="SiO2",LayerMaterial=["Pt"],Period=80)

Define the angle and energy values for which the optical functions are to be computed:

Energy=[8.0] # Incident beam energy in KeV
Theta=np.arange(start=0,stop=5,step=0.01) #Define Grazing angles in degree.

Compute reflectivity

m.get_optical_func(Theta=Theta,Energy=Energy,AllOpticalFun ="yes")

Plot outputs:

m.plot(ylog="no", Comp=["Ra","Ta","Aa"], AllComp="oplot", Scale="yes")

All available functionality with examples are described in the DarpanX_UserManual.pdf

Use of DarpanX should be acknowledged by referencing the paper: Mondal, B. et al. 2021, Astronomy and Computing.

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.