diff --git a/SAS-workflows/Giess_2022/M1_AnIML.ipynb b/SAS-workflows/Giess_2022/M1_AnIML.ipynb index cc228e8..005d13f 100644 --- a/SAS-workflows/Giess_2022/M1_AnIML.ipynb +++ b/SAS-workflows/Giess_2022/M1_AnIML.ipynb @@ -102,7 +102,7 @@ "from lxml import etree\n", "from pyaniml import AnIMLDocument, Sample, Series, ExperimentStep, Device, IndividualValueSet, SeriesSet, Category, Parameter, Unit, SIUnit\n", "from pyaniml.core.method import Author, Software\n", - "from sastools.readers import PDHReader\n", + "from sastools.readers import PDHReader, infer_type\n", "print (\"Done.\")" ] }, @@ -136,7 +136,7 @@ "source": [ "#### **Conversion of PDH to AnIML** \n", "\n", - "With this section of the notebook, a new AnIML document can be created in memory and later be serialized to XML. The presented code cells provide the most important API calles for building an AnIML document with pyAnIML. \n", + "With this section of the notebook, a new AnIML document can be created in memory and later be serialized to XML. The presented code cells provide the most important API calls for building an AnIML document with pyAnIML. \n", "Running a code cell more than once will add the contents of this cell to the AnIML document accordingly more than once. This can be used to add multiple samples, experiments, series, ... to the same document by simple changing the respective code cell before serializing it." ] }, @@ -202,7 +202,7 @@ "metadata": {}, "outputs": [], "source": [ - "pdh_dir = PDHReader(path_to_datasets / \"raw/OTAC_measurement_data/OTAC_097wtp_T\")\n", + "pdh_dir = PDHReader(path_to_datasets / \"raw/OTAC_measurement_data/OTAC_065wtp_T\")\n", "dict_of_files = pdh_dir.enumerate_available_files()\n", "for index, file in dict_of_files.items():\n", " print(f\"{index}: {file}\")" @@ -223,7 +223,7 @@ "metadata": {}, "outputs": [], "source": [ - "pdh_file = dict_of_files[65]\n", + "pdh_file = dict_of_files[0]\n", "raw_dataframe = pdh_dir.extract_data(pdh_file)\n", "raw_metadata = pdh_dir.extract_metadata(pdh_file)\n", "print(raw_dataframe)" @@ -358,7 +358,7 @@ "id": "3b271c79-6191-4701-95a5-8dbe1276a5a1", "metadata": {}, "source": [ - "7. If applicable, create the device with its various settings and/or software on which the sample(s) were measured/analysed and add them to the experiment step object:" + "7. If applicable, create the device with its various settings and/or software on which the sample(s) were measured/analyzed and add them to the experiment step object:" ] }, { @@ -484,7 +484,7 @@ "id": "cccc81e3-826f-4bfa-b507-f2459d8e1017", "metadata": {}, "source": [ - "8. Create a series for every dimension of data present in the dataframe. The data from the dataframe goes into an IndividualValueSet in form of a list, which is then added to the actual series object, together with unit information (from PDH metadata) a name, ID, the data type, the dependency, and plot scale:" + "8. Create a series for every dimension of data present in the dataframe. The data from the dataframe goes into an IndividualValueSet in form of a list, which is then added to the actual series object, together with unit information (from PDH metadata) a name, ID, data type, dependency, and plot scale:" ] }, { @@ -770,7 +770,7 @@ "metadata": {}, "outputs": [], "source": [ - "path_to_AnIML_file = path_to_datasets / f\"processed/fairsaxs_220502.animl\"" + "path_to_AnIML_file = path_to_datasets / f\"processed/fairsaxs_220512.animl\"" ] }, { @@ -879,7 +879,7 @@ "metadata": {}, "outputs": [], "source": [ - "path_to_AnIML_file = path_to_datasets / f\"processed/fairsaxs_220502.animl\"" + "path_to_AnIML_file = path_to_datasets / f\"processed/fairsaxs_220512.animl\"" ] }, { @@ -952,9 +952,9 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python [conda env:fairsaxs]", "language": "python", - "name": "python3" + "name": "conda-env-fairsaxs-py" }, "language_info": { "codemirror_mode": { @@ -966,7 +966,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.8" + "version": "3.10.4" }, "vscode": { "interpreter": { diff --git a/SAS-workflows/Giess_2022/M2-1_Curve_fitting.ipynb b/SAS-workflows/Giess_2022/M2-1_Curve_fitting.ipynb index 2346603..c891b78 100644 --- a/SAS-workflows/Giess_2022/M2-1_Curve_fitting.ipynb +++ b/SAS-workflows/Giess_2022/M2-1_Curve_fitting.ipynb @@ -144,7 +144,7 @@ "metadata": {}, "outputs": [], "source": [ - "path_to_AnIML_file = path_to_datasets / f\"download/fairsaxs_220512/fairsaxs_220512.animl\"" + "path_to_AnIML_file = path_to_datasets / f\"processed/fairsaxs_220512.animl\"" ] }, { @@ -185,8 +185,8 @@ "outputs": [], "source": [ "list_of_IDs = reader.available_seriesIDs\n", - "for series_ID in list_of_IDs:\n", - " print(series_ID)" + "for index, series_ID in enumerate(list_of_IDs):\n", + " print(index, series_ID)" ] }, { @@ -330,7 +330,7 @@ "id": "c114d047", "metadata": {}, "source": [ - "Automatically setting up the specifications for the fitting algorithm. Parameters are as following:\n", + "Automatically setting up the specifications for the fitting algorithm. Parameters are as follows:\n", "- model_type: The type of model ('GaussianModel', 'LorentzianModel' or 'VoigtModel')\n", "- tolerance: Tolerated variance of the peak location between model parameters given by the automatic_peak_finding and the final fit parameters (default is 0.5)" ] @@ -344,7 +344,7 @@ "source": [ "curvefitting.set_specifications_automatically(\n", " model_type = 'LorentzianModel',\n", - " tolerance = 0.01\n", + " tolerance = 0.5\n", ")" ] }, @@ -449,7 +449,7 @@ "metadata": {}, "outputs": [], "source": [ - "curvefitting.save_list_of_peak_centers()\n" + "curvefitting.save_list_of_peak_centers()" ] }, { @@ -491,9 +491,9 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python [conda env:fairsaxs]", "language": "python", - "name": "python3" + "name": "conda-env-fairsaxs-py" }, "language_info": { "codemirror_mode": { @@ -505,7 +505,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.8" + "version": "3.10.4" }, "vscode": { "interpreter": { diff --git a/SAS-workflows/Giess_2022/M2-1_Origin.ipynb b/SAS-workflows/Giess_2022/M2-1_Origin.ipynb index 64ec33e..3b959db 100644 --- a/SAS-workflows/Giess_2022/M2-1_Origin.ipynb +++ b/SAS-workflows/Giess_2022/M2-1_Origin.ipynb @@ -150,7 +150,7 @@ "metadata": {}, "outputs": [], "source": [ - "path_to_AnIML_file = path_to_datasets / f\"download/fairsaxs_220512/fairsaxs_220512.animl\"" + "path_to_AnIML_file = path_to_datasets / f\"processed/fairsaxs_220512.animl\"" ] }, { @@ -269,9 +269,9 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python [conda env:fairsaxs]", "language": "python", - "name": "python3" + "name": "conda-env-fairsaxs-py" }, "language_info": { "codemirror_mode": { @@ -283,7 +283,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.8" + "version": "3.10.4" }, "vscode": { "interpreter": { diff --git a/SAS-workflows/Giess_2022/M2-2_Analysis.ipynb b/SAS-workflows/Giess_2022/M2-2_Analysis.ipynb index d393cc0..01a70e2 100644 --- a/SAS-workflows/Giess_2022/M2-2_Analysis.ipynb +++ b/SAS-workflows/Giess_2022/M2-2_Analysis.ipynb @@ -76,19 +76,10 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": null, "id": "3030bb86-729f-4729-8ff7-e412b0f6e849", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Importing standard library packages.\n", - "Done.\n" - ] - } - ], + "outputs": [], "source": [ "print(\"Importing standard library packages.\")\n", "from datetime import date\n", @@ -99,19 +90,10 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": null, "id": "40310912-809a-4a64-8440-19e1dcad5eeb", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Importing PyPI packages.\n", - "Done.\n" - ] - } - ], + "outputs": [], "source": [ "print(\"Importing PyPI packages.\")\n", "import numpy as np\n", @@ -126,7 +108,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": null, "id": "b6867753-1a79-4f4b-8c3f-b053ce4ab7b3", "metadata": {}, "outputs": [], @@ -136,7 +118,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": null, "id": "18d69ade-5b4c-45e2-9e6b-9247f4d61b7d", "metadata": {}, "outputs": [], @@ -169,7 +151,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": null, "id": "2558298d-72c0-4371-9120-d974c7a5128a", "metadata": {}, "outputs": [], @@ -179,7 +161,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": null, "id": "30f95ac0-f417-40f5-8883-3d9c49facf0b", "metadata": {}, "outputs": [], @@ -199,80 +181,10 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": null, "id": "b5eee47f-e747-4c75-a50f-178cb7bd55fc", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "0 ID: CholPal_cal_20220214; Name: Calibration data\n", - "1 ID: OTAB_010wtp_T025; Name: Sample data for OTAB/water: x = 010 wt%; T = 25 C\n", - "2 ID: OTAB_020wtp_T025; Name: Sample data for OTAB/water: x = 020 wt%; T = 25 C\n", - "3 ID: OTAB_030wtp_T025; Name: Sample data for OTAB/water: x = 030 wt%; T = 25 C\n", - "4 ID: OTAB_040wtp_T025; Name: Sample data for OTAB/water: x = 040 wt%; T = 25 C\n", - "5 ID: OTAB_050wtp_T025; Name: Sample data for OTAB/water: x = 050 wt%; T = 25 C\n", - "6 ID: OTAB_061wtp_T025; Name: Sample data for OTAB/water: x = 061 wt%; T = 25 C\n", - "7 ID: OTAB_062wtp_T025; Name: Sample data for OTAB/water: x = 062 wt%; T = 25 C\n", - "8 ID: OTAB_063wtp_T025; Name: Sample data for OTAB/water: x = 063 wt%; T = 25 C\n", - "9 ID: OTAB_064wtp_T025; Name: Sample data for OTAB/water: x = 064 wt%; T = 25 C\n", - "10 ID: OTAB_065wtp_T025; Name: Sample data for OTAB/water: x = 065 wt%; T = 25 C\n", - "11 ID: OTAB_066wtp_T025; Name: Sample data for OTAB/water: x = 066 wt%; T = 25 C\n", - "12 ID: OTAB_067wtp_T025; Name: Sample data for OTAB/water: x = 067 wt%; T = 25 C\n", - "13 ID: OTAB_068wtp_T025; Name: Sample data for OTAB/water: x = 068 wt%; T = 25 C\n", - "14 ID: OTAB_069wtp_T025; Name: Sample data for OTAB/water: x = 069 wt%; T = 25 C\n", - "15 ID: OTAB_070wtp_T025; Name: Sample data for OTAB/water: x = 070 wt%; T = 25 C\n", - "16 ID: OTAB_071wtp_T025; Name: Sample data for OTAB/water: x = 071 wt%; T = 25 C\n", - "17 ID: OTAB_073wtp_T025; Name: Sample data for OTAB/water: x = 073 wt%; T = 25 C\n", - "18 ID: OTAB_074wtp_T025; Name: Sample data for OTAB/water: x = 074 wt%; T = 25 C\n", - "19 ID: OTAB_075wtp_T025; Name: Sample data for OTAB/water: x = 075 wt%; T = 25 C\n", - "20 ID: OTAB_078wtp_T025; Name: Sample data for OTAB/water: x = 078 wt%; T = 25 C\n", - "21 ID: OTAB_079wtp_T025; Name: Sample data for OTAB/water: x = 079 wt%; T = 25 C\n", - "22 ID: OTAB_080wtp_T025; Name: Sample data for OTAB/water: x = 080 wt%; T = 25 C\n", - "23 ID: OTAB_090wtp_T025; Name: Sample data for OTAB/water: x = 090 wt%; T = 25 C\n", - "24 ID: OTAB_100wtp_T025; Name: Sample data for OTAB/water: x = 100 wt%; T = 25 C\n", - "25 ID: OTAB_078wtp_T058; Name: Sample data for OTAB/water: x = 078 wt%; T = 58 C\n", - "26 ID: OTAB_078wtp_T060; Name: Sample data for OTAB/water: x = 078 wt%; T = 60 C\n", - "27 ID: OTAB_082wtp_T025; Name: Sample data for OTAB/water: x = 082 wt%; T = 25 C\n", - "28 ID: OTAB_093wtp_T025; Name: Sample data for OTAB/water: x = 093 wt%; T = 25 C\n", - "29 ID: OTAB_100wtp_T095; Name: Sample data for OTAB/water: x = 100 wt%; T = 95 C\n", - "30 ID: OTAC_001wtp_T025; Name: Sample data for OTAC/water: x = 001 wt%; T = 25 C\n", - "31 ID: OTAC_005wtp_T025; Name: Sample data for OTAC/water: x = 005 wt%; T = 25 C\n", - "32 ID: OTAC_010wtp_T025; Name: Sample data for OTAC/water: x = 010 wt%; T = 25 C\n", - "33 ID: OTAC_020wtp_T025; Name: Sample data for OTAC/water: x = 020 wt%; T = 25 C\n", - "34 ID: OTAC_030wtp_T025; Name: Sample data for OTAC/water: x = 030 wt%; T = 25 C\n", - "35 ID: OTAC_040wtp_T025; Name: Sample data for OTAC/water: x = 040 wt%; T = 25 C\n", - "36 ID: OTAC_050wtp_T025; Name: Sample data for OTAC/water: x = 050 wt%; T = 25 C\n", - "37 ID: OTAC_060wtp_T025; Name: Sample data for OTAC/water: x = 060 wt%; T = 25 C\n", - "38 ID: OTAC_061wtp_T025; Name: Sample data for OTAC/water: x = 061 wt%; T = 25 C\n", - "39 ID: OTAC_062wtp_T025; Name: Sample data for OTAC/water: x = 062 wt%; T = 25 C\n", - "40 ID: OTAC_063wtp_T025; Name: Sample data for OTAC/water: x = 063 wt%; T = 25 C\n", - "41 ID: OTAC_064wtp_T025; Name: Sample data for OTAC/water: x = 064 wt%; T = 25 C\n", - "42 ID: OTAC_065wtp_T025; Name: Sample data for OTAC/water: x = 065 wt%; T = 25 C\n", - "43 ID: OTAC_066wtp_T025; Name: Sample data for OTAC/water: x = 066 wt%; T = 25 C\n", - "44 ID: OTAC_067wtp_T025; Name: Sample data for OTAC/water: x = 067 wt%; T = 25 C\n", - "45 ID: OTAC_068wtp_T025; Name: Sample data for OTAC/water: x = 068 wt%; T = 25 C\n", - "46 ID: OTAC_069wtp_T025; Name: Sample data for OTAC/water: x = 069 wt%; T = 25 C\n", - "47 ID: OTAC_070wtp_T025; Name: Sample data for OTAC/water: x = 070 wt%; T = 25 C\n", - "48 ID: OTAC_080wtp_T025; Name: Sample data for OTAC/water: x = 080 wt%; T = 25 C\n", - "49 ID: OTAC_090wtp_T025; Name: Sample data for OTAC/water: x = 090 wt%; T = 25 C\n", - "50 ID: OTAC_091wtp_T025; Name: Sample data for OTAC/water: x = 091 wt%; T = 25 C\n", - "51 ID: OTAC_092wtp_T025; Name: Sample data for OTAC/water: x = 092 wt%; T = 25 C\n", - "52 ID: OTAC_093wtp_T025; Name: Sample data for OTAC/water: x = 093 wt%; T = 25 C\n", - "53 ID: OTAC_094wtp_T025; Name: Sample data for OTAC/water: x = 094 wt%; T = 25 C\n", - "54 ID: OTAC_095wtp_T025; Name: Sample data for OTAC/water: x = 095 wt%; T = 25 C\n", - "55 ID: OTAC_100wtp_T025; Name: Sample data for OTAC/water: x = 100 wt%; T = 25 C\n", - "56 ID: OTAC_085wtp_T074; Name: Sample data for OTAC/water: x = 085 wt%; T = 74 C\n", - "57 ID: OTAC_090wtp_T010; Name: Sample data for OTAC/water: x = 090 wt%; T = 10 C\n", - "58 ID: OTAC_094wtp_T050; Name: Sample data for OTAC/water: x = 094 wt%; T = 50 C\n", - "59 ID: OTAC_094wtp_T062; Name: Sample data for OTAC/water: x = 094 wt%; T = 62 C\n", - "60 ID: OTAC_094wtp_T068; Name: Sample data for OTAC/water: x = 094 wt%; T = 68 C\n", - "61 ID: OTAC_095wtp_T070; Name: Sample data for OTAC/water: x = 095 wt%; T = 70 C\n", - "62 ID: OTAC_097wtp_T065; Name: Sample data for OTAC/water: x = 097 wt%; T = 65 C\n" - ] - } - ], + "outputs": [], "source": [ "for index, item in enumerate(animl_doc.experiment_step_set.experiment_steps):\n", " print(index, f\"ID: {item.experiment_step_id}; Name: {item.name}\")" @@ -280,7 +192,7 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": null, "id": "8980961f-1e32-41aa-93e3-1c714daf2b39", "metadata": {}, "outputs": [], @@ -298,7 +210,7 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": null, "id": "da48feb4-6ee2-40d3-97ea-d9697d41a1a3", "metadata": {}, "outputs": [], @@ -316,18 +228,10 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": null, "id": "1827fc6e-3217-4e66-87e3-3337244f737c", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['CholPal_20220214_lorentz.txt', 'OTAC_070wtp_T025_lorentz.txt', 'OTAC_090wtp_T010_lorentz.txt', 'OTAC_094wtp_T050_lorentz.txt', 'OTAC_094wtp_T068_lorentz.txt']\n" - ] - } - ], + "outputs": [], "source": [ "available_txt_files = [file for file in (path_to_datasets / \"raw/OTAC_measurement_data/Lorentzian_fitting_data\").glob(\"*.txt\")]\n", "print([file.name for file in available_txt_files])" @@ -335,18 +239,10 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": null, "id": "db9d216b-dd90-45dd-8bfb-fba84400ca36", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "dict_keys(['CholPal_20220214_lorentz.txt', 'OTAC_070wtp_T025_lorentz.txt', 'OTAC_090wtp_T010_lorentz.txt', 'OTAC_094wtp_T050_lorentz.txt', 'OTAC_094wtp_T068_lorentz.txt'])\n" - ] - } - ], + "outputs": [], "source": [ "dict_of_df = {}\n", "i=0\n", @@ -366,18 +262,10 @@ }, { "cell_type": "code", - "execution_count": 43, + "execution_count": null, "id": "21c698fa-19cf-47b6-81de-2f2cef48c5e2", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[1.1968372019465192, 2.3936744043489915, 3.590511605155628]\n" - ] - } - ], + "outputs": [], "source": [ "prepare_standard = PrepareStandard(SAXSStandards.CHOLESTERYL_PALMITATE)\n", "q_cholpal_literature = prepare_standard.q_std_lit\n", @@ -394,18 +282,10 @@ }, { "cell_type": "code", - "execution_count": 44, + "execution_count": null, "id": "84c66955-9724-491d-9bec-0fdee784386d", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "(1.0179868569279822, 0.008622816851908443)\n" - ] - } - ], + "outputs": [], "source": [ "slope_and_intercept = prepare_standard.calculate_linear_regression(\n", " q_std_meas=dict_of_df[available_txt_files[0].name][\"value\"].tolist()\n", @@ -415,18 +295,10 @@ }, { "cell_type": "code", - "execution_count": 45, + "execution_count": null, "id": "1b4f9b30-09c6-4b05-bfd5-384a8de0a9d4", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[1.1965320399383095, 2.394285195931204, 3.590205975581628]\n" - ] - } - ], + "outputs": [], "source": [ "llc_analyzer = LLCAnalyzer()\n", "llc_analyzer.calibrate_data(\n", @@ -448,7 +320,7 @@ }, { "cell_type": "code", - "execution_count": 46, + "execution_count": null, "id": "d13c917b-5e71-48cc-a3bf-a9a2d6d8cb88", "metadata": {}, "outputs": [], @@ -458,7 +330,7 @@ }, { "cell_type": "code", - "execution_count": 47, + "execution_count": null, "id": "3481476d-422e-4d6c-a45c-028bd305eb2c", "metadata": {}, "outputs": [], @@ -474,7 +346,7 @@ }, { "cell_type": "code", - "execution_count": 48, + "execution_count": null, "id": "8689ceb1-32f6-4528-afcc-b5c3e1188cf7", "metadata": {}, "outputs": [], @@ -492,19 +364,10 @@ }, { "cell_type": "code", - "execution_count": 49, + "execution_count": null, "id": "167cff10-2f61-4009-b002-a886314da73a", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[5.251163443566069, 2.624242641543745, 1.7500904822491932]\n", - "[0.4997449936088106, 0.33327671116264196]\n" - ] - } - ], + "outputs": [], "source": [ "llc_analyzer.calculate_lattice_ratio()\n", "d_measured = llc_analyzer.d_measured\n", @@ -523,7 +386,7 @@ }, { "cell_type": "code", - "execution_count": 50, + "execution_count": null, "id": "99b1d492-9418-4953-969c-015d0eaa0688", "metadata": {}, "outputs": [], @@ -533,7 +396,7 @@ }, { "cell_type": "code", - "execution_count": 51, + "execution_count": null, "id": "76bc6e21-92ca-430f-ba0d-bcf6d7f513d3", "metadata": {}, "outputs": [], @@ -549,7 +412,7 @@ }, { "cell_type": "code", - "execution_count": 52, + "execution_count": null, "id": "8e173b35-ca1d-4f9f-baf9-15fe738a68a2", "metadata": {}, "outputs": [], @@ -575,7 +438,7 @@ }, { "cell_type": "code", - "execution_count": 53, + "execution_count": null, "id": "ea3329f1-af44-4efb-b377-459d465199b8", "metadata": {}, "outputs": [], @@ -585,7 +448,7 @@ }, { "cell_type": "code", - "execution_count": 54, + "execution_count": null, "id": "c300ab1f-f1a3-4534-8354-a53694d8bfb6", "metadata": {}, "outputs": [], @@ -601,7 +464,7 @@ }, { "cell_type": "code", - "execution_count": 55, + "execution_count": null, "id": "fe1fc2dd-ba9b-4d54-b69b-708f7b459404", "metadata": {}, "outputs": [], @@ -619,18 +482,10 @@ }, { "cell_type": "code", - "execution_count": 56, + "execution_count": null, "id": "0bbb0a85-0a5b-4122-b601-05df7e0b8753", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Lamellar LLC Phase\n" - ] - } - ], + "outputs": [], "source": [ "phase = llc_analyzer.determine_phase()\n", "print(phase)" @@ -638,18 +493,10 @@ }, { "cell_type": "code", - "execution_count": 57, + "execution_count": null, "id": "b78b1c8d-2f0f-4930-845c-3b9e8a0cb2f9", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'phase': 'La', 'lattice_parameter': 5.251163443566069}\n" - ] - } - ], + "outputs": [], "source": [ "phase.calculate_lattice_parameters(d_meas=d_measured)\n", "phase_information = phase.phase_information\n", @@ -666,7 +513,7 @@ }, { "cell_type": "code", - "execution_count": 58, + "execution_count": null, "id": "ae1fc916-abf8-4777-8588-3eab11e50c87", "metadata": {}, "outputs": [], @@ -676,7 +523,7 @@ }, { "cell_type": "code", - "execution_count": 59, + "execution_count": null, "id": "fb737589-992f-4955-acdf-c2d7dd4fecb5", "metadata": {}, "outputs": [], @@ -691,7 +538,7 @@ }, { "cell_type": "code", - "execution_count": 60, + "execution_count": null, "id": "8f6f35ce-a3c6-4221-a2b9-d2a254f4cae2", "metadata": {}, "outputs": [], @@ -706,7 +553,7 @@ }, { "cell_type": "code", - "execution_count": 61, + "execution_count": null, "id": "a7e44233-4a5f-400e-8a88-413b2d7497ab", "metadata": {}, "outputs": [], @@ -724,7 +571,7 @@ }, { "cell_type": "code", - "execution_count": 62, + "execution_count": null, "id": "90a5cef5-4bb4-494d-97e8-a9e83d865e4c", "metadata": {}, "outputs": [], @@ -734,7 +581,7 @@ }, { "cell_type": "code", - "execution_count": 63, + "execution_count": null, "id": "9942bcb8-ef85-4080-841a-19cd66ff5551", "metadata": {}, "outputs": [], @@ -744,18 +591,10 @@ }, { "cell_type": "code", - "execution_count": 64, + "execution_count": null, "id": "cd14e652-6405-471a-91c3-47d54ca11296", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Successfully created AnIML document.\n" - ] - } - ], + "outputs": [], "source": [ "with path_to_AnIML_file.open(\"w\") as f:\n", " f.write(xml_string)\n", @@ -798,22 +637,10 @@ }, { "cell_type": "code", - "execution_count": 65, + "execution_count": null, "id": "22e51af2-d5ab-41d6-aecf-f9f73a5e2883", "metadata": {}, - "outputs": [ - { - "ename": "AttributeError", - "evalue": "'LamellarPhase' object has no attribute 'calculate_sqrt_miller'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", - "\u001b[1;32m/mnt/c/Users/rscho/Documents/GitHub/SAS-workflows/SAS-workflows/Giess_2022/M2-2_Analysis.ipynb Cell 56\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 9\u001b[0m peak_centers \u001b[39m=\u001b[39m data[data[\u001b[39m\"\u001b[39m\u001b[39mkey\u001b[39m\u001b[39m\"\u001b[39m] \u001b[39m==\u001b[39m \u001b[39m\"\u001b[39m\u001b[39mxc\u001b[39m\u001b[39m\"\u001b[39m]\n\u001b[1;32m 10\u001b[0m scattering_vector \u001b[39m=\u001b[39m peak_centers[\u001b[39m\"\u001b[39m\u001b[39mvalue\u001b[39m\u001b[39m\"\u001b[39m]\u001b[39m.\u001b[39mvalues\u001b[39m.\u001b[39mtolist()\n\u001b[0;32m---> 12\u001b[0m phase\u001b[39m.\u001b[39;49mcalculate_sqrt_miller()\n\u001b[1;32m 13\u001b[0m x \u001b[39m=\u001b[39m phase\u001b[39m.\u001b[39msqrt_miller\n\u001b[1;32m 14\u001b[0m phase\u001b[39m.\u001b[39mcalculate_d_reciprocal(peak_center\u001b[39m=\u001b[39mscattering_vector)\n", - "\u001b[0;31mAttributeError\u001b[0m: 'LamellarPhase' object has no attribute 'calculate_sqrt_miller'" - ] - } - ], + "outputs": [], "source": [ "data = pd.read_table(path_to_datasets / \"raw/OTAC_measurement_data/Lorentzian_fitting_data/OTAC_094wtp_T050_lorentz.txt\",\n", " delimiter=\"\\t\",\n", @@ -855,17 +682,7 @@ "execution_count": null, "id": "140df793-6f64-40cc-9a2e-96cf7c14ae82", "metadata": {}, - "outputs": [ - { - "ename": "", - "evalue": "", - "output_type": "error", - "traceback": [ - "\u001b[1;31mFailed to start the Kernel. \n", - "\u001b[1;31mView Jupyter log for further details." - ] - } - ], + "outputs": [], "source": [ "coef = np.polyfit(x, y, 1)\n", "fit = np.poly1d(coef)\n", @@ -885,17 +702,7 @@ "execution_count": null, "id": "5ad67955-c143-4622-9514-64648a61d122", "metadata": {}, - "outputs": [ - { - "ename": "", - "evalue": "", - "output_type": "error", - "traceback": [ - "\u001b[1;31mFailed to start the Kernel. \n", - "\u001b[1;31mView Jupyter log for further details." - ] - } - ], + "outputs": [], "source": [ "fig = plt.figure(dpi=600)\n", "ax = fig.add_subplot()\n", @@ -927,17 +734,7 @@ "execution_count": null, "id": "f8c316a9-10a5-4e99-ba99-3e005ff14e0a", "metadata": {}, - "outputs": [ - { - "ename": "", - "evalue": "", - "output_type": "error", - "traceback": [ - "\u001b[1;31mFailed to start the Kernel. \n", - "\u001b[1;31mView Jupyter log for further details." - ] - } - ], + "outputs": [], "source": [ "exact_cubic_phase = LLCPhases.INDETERMINATE\n", "phase.exact_phase = exact_cubic_phase" @@ -948,17 +745,7 @@ "execution_count": null, "id": "16da82d0-d673-4ab5-81b9-da3214e0774c", "metadata": {}, - "outputs": [ - { - "ename": "", - "evalue": "", - "output_type": "error", - "traceback": [ - "\u001b[1;31mFailed to start the Kernel. \n", - "\u001b[1;31mView Jupyter log for further details." - ] - } - ], + "outputs": [], "source": [ "for category in experiment_step.results[1].content:\n", " if category.name == \"phase information\":\n", @@ -977,17 +764,7 @@ "execution_count": null, "id": "16e5c6d7-fc1c-44d0-9a78-744dc6dbbbf4", "metadata": {}, - "outputs": [ - { - "ename": "", - "evalue": "", - "output_type": "error", - "traceback": [ - "\u001b[1;31mFailed to start the Kernel. \n", - "\u001b[1;31mView Jupyter log for further details." - ] - } - ], + "outputs": [], "source": [ "xml_string = animl_doc.toXML()" ] @@ -997,17 +774,7 @@ "execution_count": null, "id": "6678df78-b274-460c-b07f-ea3675f4c4e6", "metadata": {}, - "outputs": [ - { - "ename": "", - "evalue": "", - "output_type": "error", - "traceback": [ - "\u001b[1;31mFailed to start the Kernel. \n", - "\u001b[1;31mView Jupyter log for further details." - ] - } - ], + "outputs": [], "source": [ "with path_to_AnIML_file.open(\"w\") as f:\n", " f.write(xml_string)\n", @@ -1050,31 +817,13 @@ "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n", "SOFTWARE." ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "b003ffef-a092-4f28-a1eb-ac35082c9464", - "metadata": {}, - "outputs": [ - { - "ename": "", - "evalue": "", - "output_type": "error", - "traceback": [ - "\u001b[1;31mFailed to start the Kernel. \n", - "\u001b[1;31mView Jupyter log for further details." - ] - } - ], - "source": [] } ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python [conda env:fairsaxs]", "language": "python", - "name": "python3" + "name": "conda-env-fairsaxs-py" }, "language_info": { "codemirror_mode": { @@ -1086,7 +835,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.8" + "version": "3.10.4" }, "vscode": { "interpreter": { diff --git a/SAS-workflows/Giess_2022/M2-2_Diffractograms.ipynb b/SAS-workflows/Giess_2022/M2-2_Diffractograms.ipynb index ba9bf7d..e607407 100644 --- a/SAS-workflows/Giess_2022/M2-2_Diffractograms.ipynb +++ b/SAS-workflows/Giess_2022/M2-2_Diffractograms.ipynb @@ -198,7 +198,7 @@ "files_to_plot = [file for index, file in enumerate(list_of_IDs) if file.startswith(\"OTAB\")]\n", "print(files_to_plot)\n", "\n", - "reader.selected_seriesIDs.append(files_to_plot)\n", + "reader.selected_seriesIDs = files_to_plot\n", "dataframe = reader.create_dataframe()" ] }, @@ -662,7 +662,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.6" + "version": "3.10.4" } }, "nbformat": 4, diff --git a/SAS-workflows/Giess_2022/datasets/processed/fairsaxs_220512.animl b/SAS-workflows/Giess_2022/datasets/processed/fairsaxs_220512.animl index 95a3631..edda515 100644 --- a/SAS-workflows/Giess_2022/datasets/processed/fairsaxs_220512.animl +++ b/SAS-workflows/Giess_2022/datasets/processed/fairsaxs_220512.animl @@ -64,6 +64,7 @@ + @@ -144422,6 +144423,26 @@ 5.251163443566069 + + + 1.1965320399383093 + 2.3942851959312037 + 3.5902059755816276 + + + 5.25116344356607 + 2.6242426415437454 + 1.7500904822491934 + + + 0.4997449936088106 + 0.33327671116264196 + + + La + 5.25116344356607 + +