Open patrick-austin opened 1 month ago
Hi both,
Good point Patrick. None of those negative values should be allowed, as they do not have any physical meaning.
Other parameters that can cause issues when given negative values:
At this point I think it's likely that a lack of input validation is the rule rather than the exception. A general review of all numeric parameters to ensure they are being validated is probably sensible.
with regards to spec-step and spec-line-width being negative. We now have a message when a negative value is used. It is this one: ' Parameter spec_step: Value ('-10.0') must fulfill float('0.0') <= float(value) <= float('inf')'. Now... I understand that error message. It says that the values has to be between 0 and inf. However... Is there any way of putting this error message in human-like language?
Describe the bug Submitting a negative spec_step results in the command never completing. Submitting a negative spec_linewidth results in a completing job, but don't think that a negative width is physically valid.
To Reproduce
Expected behavior The former should definitely not be allowed. A validation error should prevent a negative step being used to prevent the command never completing. I also don't think that a negative linewidth is physically valid, but this is less of an issue as it doesn't cause a total failure like the step does.
Screenshots Spectrum with 1e5 linewidth![image](https://github.com/muon-spectroscopy-computational-project/mudirac/assets/61705287/ba8554aa-f3fd-4217-9dde-a981ba1bc505)
Spectrum with -1e5 linewidth![image](https://github.com/muon-spectroscopy-computational-project/mudirac/assets/61705287/3ffb1d27-57a5-4a24-88b8-83ce3f67a41e)
~Desktop~VM (please complete the following information):