Skip to content

Commit

Permalink
Log the NNDC data source used for parsing (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyas3156 authored Aug 10, 2023
1 parent 55c393c commit 46300ff
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions carsus/io/nuclear/nndc.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import logging

import pandas as pd
from pathlib import Path
import subprocess
Expand All @@ -8,6 +10,8 @@

NNDC_SOURCE_URL = "https://github.com/tardis-sn/carsus-data-nndc"

logger = logging.getLogger(__name__)


class NNDCReader:
"""
Expand All @@ -34,10 +38,13 @@ def __init__(self, dirname=None, remote=False):
if dirname is None:
if remote:
subprocess.run(['git', 'clone', NNDC_SOURCE_URL, DECAY_DATA_SOURCE_DIR])
logger.info(f"Downloading NNDC decay data from {NNDC_SOURCE_URL}")
self.dirname = Path().joinpath(DECAY_DATA_SOURCE_DIR, "csv")
else:
self.dirname = dirname

logger.info(f"Parsing decay data from: {DECAY_DATA_SOURCE_DIR}/csv")

self._decay_data = None

@property
Expand Down

0 comments on commit 46300ff

Please sign in to comment.