Plot spectrum MCA
parent
25983e99a4
commit
18e49c744a
|
@ -0,0 +1,92 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# witzit-plot --- What In The Zap Is That? AI categorization of spectra from LIBS/XRF analyzers.\n",
|
||||
"#\n",
|
||||
"# Copyright (C) 2019-2022, Jeff Moe\n",
|
||||
"#\n",
|
||||
"# This program is free software: you can redistribute it and/or modify\n",
|
||||
"# it under the terms of the GNU General Public License as published by\n",
|
||||
"# the Free Software Foundation, either version 3 of the License, or\n",
|
||||
"# (at your option) any later version.\n",
|
||||
"#\n",
|
||||
"# This program is distributed in the hope that it will be useful,\n",
|
||||
"# but WITHOUT ANY WARRANTY; without even the implied warranty of\n",
|
||||
"# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n",
|
||||
"# GNU General Public License for more details.\n",
|
||||
"#\n",
|
||||
"# You should have received a copy of the GNU General Public License\n",
|
||||
"# along with this program. If not, see <http://www.gnu.org/licenses/>.\n",
|
||||
"#\n",
|
||||
"# Plotting Application.\n",
|
||||
"# https://spacecruft.org/spacecruft/witzit\n",
|
||||
"#\n",
|
||||
"# Based on wut?\n",
|
||||
"# https://spacecruft.org/spacecruft/satnogs-wut"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import pandas as pd"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"template = pd.read_csv('template/sciaps-x555.csv')\n",
|
||||
"mca = pd.read_csv('examples/golden_buffalo.mca', skiprows=21)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"df=template.join(mca)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"df.plot(y=\"2048\", x=\"energy (eV)\")"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3 (ipykernel)",
|
||||
"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.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 4
|
||||
}
|
Loading…
Reference in New Issue