diff --git a/atmosphericRadiationDoseAndFlux/doseAndFluxCalculator.py b/atmosphericRadiationDoseAndFlux/doseAndFluxCalculator.py index 769c104..217109f 100644 --- a/atmosphericRadiationDoseAndFlux/doseAndFluxCalculator.py +++ b/atmosphericRadiationDoseAndFlux/doseAndFluxCalculator.py @@ -12,6 +12,8 @@ from typing import Callable +print("Warning from atmosphericRadiationDoseAndFlux module: currently using an alpha particle as input actually calculates the contribution from alpha + all simulated heavier ions, rather than just alpha particles!") + @settings.allowCalculationForTotalOfParticles def calculate_from_energy_spec( inputEnergyDistributionFunctionMeV:Callable, diff --git a/atmosphericRadiationDoseAndFlux/settings.py b/atmosphericRadiationDoseAndFlux/settings.py index 2328f1c..cc0d5de 100644 --- a/atmosphericRadiationDoseAndFlux/settings.py +++ b/atmosphericRadiationDoseAndFlux/settings.py @@ -9,6 +9,12 @@ import inspect +print("Warning from atmosphericRadiationDoseAndFlux module: currently using an alpha particle as input actually calculates the contribution from alpha + all simulated heavier ions, rather than just alpha particles!") + +# import logging +# logger = logging.getLogger('DoseAndFluxCalculatorLogger') +# logger.setLevel(logging.WARNING) + def convertListOrFloatToArray(value)->np.array: if isinstance(value,np.ndarray): outputValue = value @@ -59,6 +65,8 @@ def totalDoseFlux(*args, **kwargs): return totalDoseFlux +#alpha_warning_already_printed = False + def formatInputVariables(inputEnergyBins, inputFluxesMeV, altitudesInkm, particleName, verticalCutOffRigidity): particleForCalculations = Particle(particleName) @@ -80,8 +88,10 @@ def formatInputVariables(inputEnergyBins, inputFluxesMeV, altitudesInkm, particl else: raise Exception("inputFluxesMeV not specified as a valid type!") - if particleName == "alpha": - print("Warning: currently using an alpha particle as input actually calculates the contribution from alpha + all simulated heavier ions, rather than just alpha particles!") + # if particleName == "alpha" and not (alpha_warning_already_printed): + # print("Warning: currently using an alpha particle as input actually calculates the contribution from alpha + all simulated heavier ions, rather than just alpha particles!") + # alpha_warning_already_printed = True + # #logger.warning("Warning: currently using an alpha particle as input actually calculates the contribution from alpha + all simulated heavier ions, rather than just alpha particles!") if len(inputEnergyBinsArray) != len(inputFluxesArrayMeV_noVcutOff) + 1: raise Exception("Number of bins does not match number of flux values!") diff --git a/setup.py b/setup.py index 612d2a3..1df44de 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ packages=find_packages(exclude='tests'), package_data={"atmosphericRadiationDoseAndFlux":["atmosphericRadiationDoseAndFlux/data/proton/*.rpf","atmosphericRadiationDoseAndFlux/data/alpha/*.rpf"]}, include_package_data=True, - version='1.0.11', + version='1.0.12', description='Python library for calculating doses and fluxes at a particular altitude given an input spectrum', long_description=long_description, long_description_content_type='text/markdown',