{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Simulated cone basic analysis\n\nSimple workflow for analyzing a deflector scan data.\nThe same workflow can be applied in the case of manipulator angular scans.\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Import the \"fundamental\" python libraries for a generic data analysis:\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import numpy as np" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Import the navarp libraries:\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "from navarp.utils import navfile" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Load the data from a file:\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "file_name = r\"nxarpes_simulated_cone.nxs\"\nentry = navfile.load(file_name)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Plot a single slice\nEx: scan = 0.5\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "scan = 0.5\nentry.isoscan(scan).show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Fermi level determination\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "entry.autoset_efermi(energy_range=[93.8, 94.3])\nentry.plt_efermi_fit()\n\nprint(\"Fermi level = {:.3f} meV\".format(entry.efermi))\nprint(\"Energy resolution = {:.0f} meV\".format(entry.efermi_fwhm*1000))\nprint(\"hv = {:g} eV\".format(np.squeeze(entry.hv)))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Since now the Fermi level is known, the same plot is automatically aligned\nEx: scan = 0.5\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "scan = 0.5\nentry.isoscan(scan).show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Plotting iso-energetic cut\nEx: isoenergy cut at ekin = efermi\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "ebin = 0\ndebin = 0.005\nentry.isoenergy(ebin, debin).show()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.13" } }, "nbformat": 4, "nbformat_minor": 0 }