Code Monkey home page Code Monkey logo

xrdpattern's Introduction

About

Python library for handling XrdPatterns including support for importing from data files, exporting as json file, visualization and postprocessing. The data file import functionalities are largely built on the C++ library xylib so beyond a standard python install this library also requires:

  • A C++ compiler and standard library
  • A C++ to python bridge (Swig)

Setup

System level requirements

For Ubuntu 22.04:

sudo apt install build-essential	# GNU C++ compiler
sudo apt install libboost-all-dev       # C++ libraries provided by Boost
sudo apt install swig 			# python -> C++ bridge

For Windows >10 you may try the following in PowerShell (requires Chocolatey):

choco install mingw  # C++ compiler and std library
choco install swig   # python -> C++ bridge

Python library

Once the system level requirements are installed, the library can be installed using pip:

pip install xrdpattern

Supported formats

Loading Diffractogram patterns from the following data formats is supported:

  • Plain Text Files

    • Comma seperated values (.csv)
    • Crystallographic Information File for Powder Diffraction (.cif)
    • Custom XrdPattern json format (.json)
    • Plain text tab seperated values (.txt) (! In progress)
    • PANalytical XRDML (.xrdml)
    • Freiberg Instruments XSYG (.xysg)
  • Binaries:

    • Siemens/Bruker RAW ver. 1/2/3/4 (.raw)
    • Stoe RAW (.raw) (! In progress)
    • Siemens/Bruker UXD (.uxd)
    • Philips UDF (.udf)
    • Philips RD ver. 3/5 (.rd)
    • Rigaku DAT (.dat)
    • RIET7 DAT (.dat)
    • Sietronics Sieray CPI (.cpi)
    • XFIT/Koalariet XDD (.xdd)
    • DBWS/DMPLOT data file (.dbw, .rit, .neu)
    • Canberra CNF (.cnf)
    • Canberra AccuSpec MCA (.mca)
    • χPLOT CHI (.chi)
    • Bruker SPC (.spc)

When using Xrdpattern.load(fpath=xrdfile.suffix), the format will be automatically determined from the suffix unless there are are several formats with this format as with .raw and .dat. In this case the format will need to be manually specified.

xrdpattern's People

Contributors

somerandomguy10111 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

xrdpattern's Issues

Deleted package detected

I'm a Cyber Security researcher and developer of PackjGuard [1] to address open-source software supply chain attacks.

Issue

During my research, I detected a deleted package in this repository.

Details

Specifically, the package xrdpattern mentioned in file README at line 28 does not exist on the public PyPI registry. A bad actor can hijack this package to propagate malicious code.

Impact

Not only your apps/services using https://github.com/aimat-lab/xrdpattern repo code are vulnerable to this attack, but the users of your open-source Github repo could also fall victim.

You could read more about such attacks here: https://medium.com/@alex.birsan/dependency-confusion-4a5d60fec610

Remediation

Please highlight this in file README and register a placeholder package for xrdpattern on public PyPI soon to remediate.

To automatically fix such issues in future, please install PackjGuard Github app [1].

Thanks!

  1. PackjGuard is a Github app that monitors your repos 24x7, detects vulnerable/malicious/risky open-source dependencies, and creates pull requests for auto remediation: https://github.com/marketplace/packjguard

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.