Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
437 changes: 437 additions & 0 deletions AutoRun_functions/AutoRun_functions.py

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
432 changes: 432 additions & 0 deletions AutoRun_functions/backup/AutoRun_functions_03112024.py

Large diffs are not rendered by default.

1,491 changes: 1,491 additions & 0 deletions Auto_Analysis_Functions/Auto_Analysis_Functions.py

Large diffs are not rendered by default.

Binary file not shown.
2,942 changes: 2,942 additions & 0 deletions Data_Processing/WAXS/Pilatus800k_WAXS_analysis.ipynb

Large diffs are not rendered by default.

670 changes: 670 additions & 0 deletions Data_Processing/WAXS/SAXS_WAXS_Database.ipynb

Large diffs are not rendered by default.

370 changes: 370 additions & 0 deletions Data_Processing/WAXS/WAXS_Batch_Processing.ipynb

Large diffs are not rendered by default.

1,293 changes: 1,293 additions & 0 deletions Data_Processing/WAXS/WAXS_Geometry_Calibration.ipynb

Large diffs are not rendered by default.

798 changes: 798 additions & 0 deletions Data_Processing/WAXS/WAXS_ReProcessing_Export.ipynb

Large diffs are not rendered by default.

163 changes: 163 additions & 0 deletions Data_Processing/WAXS/WAXS_auto_processing.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "b84c70d5-022d-4a1e-ba89-f968de728eba",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Tiled version 0.1.0a120\n",
"/nsls2/conda/envs/2024-2.0-py311-tiled/lib/python3.11/site-packages/databroker/v1.py:72: UserWarning: In databroker 2.x, there are separate notions of 'server' and 'client', and register_handler(...) has no effect on the client. Likely this is being done for you on the server side, so you should not worry about this message unless you encounter trouble loading large array data.\n",
" warnings.warn(\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[32mrunning on: jupyter_hub environment: standard\n",
"\u001b[0m\n",
"\u001b[36msetting '_base_path_' as /nsls2/data/chx/legacy/analysis/\u001b[0m\n",
"\u001b[36msetting '_mask_path_' as /nsls2/data/chx/shared/CHX_Setup/Detector_masks/\n",
"\u001b[0m\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Tiled version 0.1.0a120\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[32mRe-imported pyCHX from /nsls2/data/chx/shared/CHX_Software/packages/pyCHX/\u001b[0m\n",
"\u001b[32mRe-imported chx_compress from /nsls2/data/chx/shared/CHX_Software/packages/pyCHX/chx_compress.py\u001b[0m\n",
"\u001b[35m\n",
"environment dependent settings and patches:\u001b[0m\n",
"using \"%matplotlib inline\" for plotting\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/nsls2/conda/envs/2024-2.0-py311-tiled/lib/python3.11/site-packages/databroker/v1.py:72: UserWarning: In databroker 2.x, there are separate notions of 'server' and 'client', and register_handler(...) has no effect on the client. Likely this is being done for you on the server side, so you should not worry about this message unless you encounter trouble loading large array data.\n",
" warnings.warn(\n"
]
}
],
"source": [
"from pyCHX.chx_packages import *\n",
"plt.rcParams.update({'figure.max_open_warning': 0})\n",
"plt.rcParams.update({ 'image.origin': 'lower' })\n",
"plt.rcParams.update({ 'image.interpolation': 'none' })\n",
"import json\n",
"import sys\n",
"sys.path.insert(0, \"/nsls2/data/chx/shared/CHX_Software/packages/waxs_auto_processing/\")\n",
"from waxs_auto_processing import *\n",
"\n",
"\n",
"%run /nsls2/data/chx/shared/CHX_Software/packages/environment_management/chx_analysis_setup_test_pyCHX.ipynb"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "ede9e0e4-128f-466f-beaf-7f28d575a7a4",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"data_dir = '/nsls2/data/chx/legacy/analysis/2024_2/AutoRuns/lwiegart/' # folder with the json dict in\n",
"fn='waxs_uids.json'\n",
"waxs_uids_dict_file=data_dir+fn\n",
"\n",
"analyst = 'lwiegart'\n",
"calibration_uid = 149555 # WAXS detector position optimized for polypropylene sample (scan_id is likely to work, but provide uid if you can)\n",
"insert_dict={'template_name':'Pilatus800k_WAXS_analysis','analyst':analyst} # need the template name, IF 'analyst' is missing, we assume it's the same as 'user'\n",
"txt_filename = 'waxs_dataprocessing.txt' # will be saved in same directory as waxs_uids_dict_file"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "5a199867-3711-436b-a7a1-66351118f68c",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Mon Aug 5 17:12:10 2024: waiting for uids to be processed...\n"
]
},
{
"ename": "KeyboardInterrupt",
"evalue": "",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[3], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mrun_waxs_papermill_loop\u001b[49m\u001b[43m(\u001b[49m\u001b[43mwaxs_uids_dict_file\u001b[49m\u001b[43m,\u001b[49m\u001b[43mcalibration_uid\u001b[49m\u001b[43m,\u001b[49m\u001b[43minsert_dict\u001b[49m\u001b[43m,\u001b[49m\u001b[43mtxt_filename\u001b[49m\u001b[43m,\u001b[49m\u001b[43m_base_path_\u001b[49m\u001b[43m,\u001b[49m\u001b[43mempty_list_timeout\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43mverbose\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mFalse\u001b[39;49;00m\u001b[43m)\u001b[49m\n",
"File \u001b[0;32m/nsls2/data/chx/shared/CHX_Software/packages/waxs_auto_processing/waxs_auto_processing.py:135\u001b[0m, in \u001b[0;36mrun_waxs_papermill_loop\u001b[0;34m(waxs_uids_dict_file, calibration_uid, insert_dict, txt_filename, _base_path_, empty_list_timeout, verbose)\u001b[0m\n\u001b[1;32m 133\u001b[0m run_condition\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mFalse\u001b[39;00m\n\u001b[1;32m 134\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mTIMEOUT: stopping to look for new uids.\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m--> 135\u001b[0m time\u001b[38;5;241m.\u001b[39msleep(\u001b[38;5;241m10\u001b[39m)\n",
"\u001b[0;31mKeyboardInterrupt\u001b[0m: "
]
}
],
"source": [
"run_waxs_papermill_loop(waxs_uids_dict_file,calibration_uid,insert_dict,txt_filename,_base_path_,empty_list_timeout=None,verbose=False)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9f067c36-faf0-4780-a07b-41349d29c9a1",
"metadata": {
"tags": []
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "ed28146b-d10d-4337-85ca-c2555319b55a",
"metadata": {},
"outputs": [],
"source": []
}
],
"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.11.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
185 changes: 185 additions & 0 deletions Data_Processing/WAXS/WAXS_queue.ipynb

Large diffs are not rendered by default.

Loading