Changeset 5e84106 in ammosreader
- Timestamp:
- 05/10/22 16:51:55 (3 years ago)
- Branches:
- AmmosSource, guix
- Children:
- 77ab452
- Parents:
- 27e3114
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
reqs.txt
r27e3114 r5e84106 1 numpy==1.21. 51 numpy==1.21.0 2 2 pymongo==4.1.1 3 3 scipy==1.8.0 4 setuptools==5 9.6.04 setuptools==58.1.0 5 5 sphinx_adc_theme==0.1.7 -
sample_scripts/import_signals.py
r27e3114 r5e84106 1 """I import .ppdw files from multiple subdirectories into a mongodb.""" 2 1 3 import sys 2 4 import re … … 15 17 16 18 source = args.source.upper() 17 # code = args.code.upper()18 # signal_number = args.signal_number19 19 input_dir = Path(args.input_dir) 20 20 … … 25 25 code = input_dir.name 26 26 27 #if not re.match('[A-Z][0-9]{3}[A-Z]', code): 27 # FIXME: Directory structure differs 28 # FIXME: get julian date, source identifier, signal number and ELINT-Code from input_dir path 29 30 # if not re.match('[A-Z][0-9]{3}[A-Z]', code): 28 31 # print("ELINT-Code incorrect") 29 32 # sys.exit(1) 30 33 31 #if not re.match('[0-9]{4}', signal_number):32 # print("Signal number incorrect")33 # sys.exit(1)34 34 35 35 if not input_dir.is_dir(): … … 43 43 for each_dir in subdirs: 44 44 45 print("Each dir", each_dir)45 # print("Each dir", each_dir) 46 46 dir_name = each_dir.name 47 47 48 files_inside = [each for each in (each_dir.iterdir()) if (each.suffix in ['.idx', '.iqdw', '.ppdw'] and each_dir.stem == dir_name)] 48 # if not re.match('[0-9]{5}', dir_name): 49 # print("Signal number incorrect") 50 # sys.exit(1) 49 51 50 print("Files inside", files_inside) 52 files_inside = [each for each in (each_dir.iterdir()) if (each.suffix in ['.idx', '.iqdw', '.ppdw'] and 53 each_dir.stem == dir_name)] 54 55 # print("Files inside", files_inside) 51 56 if len(files_inside) != 3: 52 57 print(".idx, .iqdw or .ppdw file missing in", each_dir) … … 55 60 iqdw_file = (input_dir / each_dir / each_dir.stem).with_suffix('.iqdw') 56 61 ppdw_file = (input_dir / each_dir / each_dir.stem).with_suffix('.ppdw') 57 print("PPDW file", ppdw_file)62 # print("PPDW file", ppdw_file) 58 63 idx_file = (input_dir / each_dir / each_dir.stem).with_suffix('.idx') 59 64 … … 65 70 time_tuple = datetime.utcfromtimestamp(ts).timetuple() 66 71 julian_date_string = str(time_tuple.tm_year)[2:] + str(time_tuple.tm_yday).zfill(3) 72 print("Julian", julian_date_string, str(ppdw_file)) 67 73 code_collection = database[input_dir.name] 68 74 year_collection = code_collection[str(time_tuple.tm_year)] -
setup.cfg
r27e3114 r5e84106 31 31 numpy==1.21 32 32 setuptools>=52.0.0 33 python_requires = >=3. 1033 python_requires = >=3.9 34 34 package_dir = 35 35 =src
Note:
See TracChangeset
for help on using the changeset viewer.