Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/elab_metadata_integration' into …
Browse files Browse the repository at this point in the history
…develop
  • Loading branch information
rettigl committed Feb 9, 2025
2 parents 86be2a6 + fd2b313 commit 9d7bf93
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
5 changes: 4 additions & 1 deletion src/specsanalyzer/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ def setup_logging(
user_log_path = DEFAULT_LOG_DIR
try:
os.makedirs(user_log_path, exist_ok=True)
log_file = os.path.join(user_log_path, f"sed_{datetime.now().strftime('%Y-%m-%d')}.log")
log_file = os.path.join(
user_log_path,
f"specsanalyzer_{datetime.now().strftime('%Y-%m-%d')}.log",
)

# Create file handler and set level to debug
file_handler = logging.FileHandler(log_file)
Expand Down
4 changes: 2 additions & 2 deletions src/specsscan/config/example_config_FHI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ units:

metadata:
# URL of the elabFTW instance API interface
elab_url: "https://__elabftw_host__/api/v2"
# elab_url: "https://__elabftw_host__/api/v2"
# URL of the epics archiver request engine
archiver_url: "http://__epicsarchiver_host__:17668/retrieval/data/getData.json?pv="
# archiver_url: "http://__epicsarchiver_host__:17668/retrieval/data/getData.json?pv="
# dictionary containing axis names with Epics channels to request from the EPICS archiver
epics_channels:
tempa: "trARPES:Carving:TEMP_RBV"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def test_logger_has_base_logger(logger_):

def test_logger_creates_logfile(tmp_path):
logger = setup_logging("test_logger", set_base_handler=True, user_log_path=tmp_path)
log_file = os.path.join(tmp_path, f"sed_{datetime.now().strftime('%Y-%m-%d')}.log")
log_file = os.path.join(tmp_path, f"specsanalyzer_{datetime.now().strftime('%Y-%m-%d')}.log")
assert os.path.exists(log_file)
with open(log_file) as f:
assert f.read() == ""
Expand Down
11 changes: 3 additions & 8 deletions tutorial/3_specsscan_conversion_to_NeXus.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"outputs": [],
"source": [
"config = {\"nexus\":{\"definition\": \"NXmpes_arpes\"}, \"spa_params\":{\"crop\":True, \"ek_range_min\":0.07597844332538181, \"ek_range_max\":0.9117413199045858, \"ang_range_min\":0.16453159041394336, \"ang_range_max\":0.8840087145969499,}}\n",
"sps = SpecsScan(config=config, user_config=\"../src/specsscan/config/example_config_FHI.yaml\")\n",
"sps = SpecsScan(config=config, user_config=\"../src/specsscan/config/example_config_FHI.yaml\", system_config={})\n",
"path = \"../tests/data/\" # Path to the test data set"
]
},
Expand Down Expand Up @@ -234,7 +234,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": ".venv",
"language": "python",
"name": "python3"
},
Expand All @@ -248,12 +248,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.12"
},
"vscode": {
"interpreter": {
"hash": "a164666994e9db75450cd7016dd7e51d42ea6e7c1e5e8017af1f8068ca906367"
}
"version": "3.12.8"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 9d7bf93

Please sign in to comment.