check that files exist powerspectrum
This commit is contained in:
parent
dbc3c408a3
commit
4fa6ccc842
1 changed files with 5 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
import numpy as np
|
||||
import os
|
||||
|
||||
kmin = 1e-1
|
||||
kmax = 2e0
|
||||
|
@ -286,6 +287,10 @@ if __name__ == "__main__":
|
|||
if not args.power_spectrum and not args.cross_correlation:
|
||||
print('You must choose between power_spectrum and cross_correlation.')
|
||||
exit()
|
||||
|
||||
for _k,f in enumerate(args.filenames):
|
||||
if not os.path.exists(args.directory+f):
|
||||
raise FileNotFoundError(f"File {args.directory+f} does not exist.")
|
||||
|
||||
if args.reference is not None:
|
||||
from pysbmy.field import read_field
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue