Skip to content
Snippets Groups Projects
Commit 4774769f authored by Gröne, Tjark Leon Raphael's avatar Gröne, Tjark Leon Raphael
Browse files

Update file maxwell_integrate_to_h5.py

parent bed9e2c6
No related branches found
No related tags found
No related merge requests found
...@@ -226,12 +226,12 @@ if __name__ == '__main__': ...@@ -226,12 +226,12 @@ if __name__ == '__main__':
raise ValueError("POLARIZATION must be a float between 0 and 1") raise ValueError("POLARIZATION must be a float between 0 and 1")
if not sys.argv[7].isdigit(): if not sys.argv[7].isdigit():
raise ValueError("NPT must be a positive integer") raise ValueError("NPT must be a positive integer")
if not sys.argv[8].isalpha(): if not isinstance(sys.argv[8],str):
raise ValueError("UNIT must be a string representing the unit (e.g., 'q_A^-1', 'q_nm^-1', 'q_ang^-1')") raise ValueError("UNIT must be a string representing the unit (e.g., 'q_A^-1', 'q_nm^-1', 'q_ang^-1')")
if not sys.argv[9].isalpha(): if not sys.argv[9].isalpha():
raise ValueError("ERRORMODE must be a string representing the error model (e.g., 'poisson', 'azimuthal', 'none')") raise ValueError("ERRORMODE must be a string representing the error model (e.g., 'poisson', 'azimuthal', 'none')")
if not sys.argv[10].isalpha(): if not isinstance(sys.argv[10], str):
raise ValueError("DATATYPE must be a string representing the data type (e.g., 'tif', 'tiff')") raise ValueError("DATATYPE must be a string representing the data type (e.g., 'tif', 'tiff')")
...@@ -247,7 +247,7 @@ if __name__ == '__main__': ...@@ -247,7 +247,7 @@ if __name__ == '__main__':
DATATYPE = str(sys.argv[10]).lower() DATATYPE = str(sys.argv[10]).lower()
FORBIDDEN = sys.argv[11].split(',') if len(sys.argv) > 11 else [] FORBIDDEN = sys.argv[11].split(',') if len(sys.argv) > 11 else []
if DATATYPE not in {"tif", "tiff", "TIF", "TIFF"}: if DATATYPE not in {".tif", ".tiff", ".TIF", ".TIFF"}:
raise ValueError(f"Unsupported data type: {DATATYPE}") raise ValueError(f"Unsupported data type: {DATATYPE}")
if UNIT not in {"q_A^-1", "q_nm^-1", "q_ang^-1"}: if UNIT not in {"q_A^-1", "q_nm^-1", "q_ang^-1"}:
raise ValueError(f"Unsupported unit: {UNIT}") raise ValueError(f"Unsupported unit: {UNIT}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment