Changeset 5e84106 in ammosreader


Ignore:
Timestamp:
05/10/22 16:51:55 (3 years ago)
Author:
Enrico Schwass <ennoausberlin@…>
Branches:
AmmosSource, guix
Children:
77ab452
Parents:
27e3114
Message:

python version downgraded to 3.9

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • reqs.txt

    r27e3114 r5e84106  
    1 numpy==1.21.5
     1numpy==1.21.0
    22pymongo==4.1.1
    33scipy==1.8.0
    4 setuptools==59.6.0
     4setuptools==58.1.0
    55sphinx_adc_theme==0.1.7
  • sample_scripts/import_signals.py

    r27e3114 r5e84106  
     1"""I import .ppdw files from multiple subdirectories into a mongodb."""
     2
    13import sys
    24import re
     
    1517
    1618source = args.source.upper()
    17 # code = args.code.upper()
    18 # signal_number = args.signal_number
    1919input_dir = Path(args.input_dir)
    2020
     
    2525code = input_dir.name
    2626
    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):
    2831#    print("ELINT-Code incorrect")
    2932#    sys.exit(1)
    3033
    31 #if not re.match('[0-9]{4}', signal_number):
    32 #    print("Signal number incorrect")
    33 #    sys.exit(1)
    3434
    3535if not input_dir.is_dir():
     
    4343for each_dir in subdirs:
    4444
    45     print("Each dir", each_dir)
     45    # print("Each dir", each_dir)
    4646    dir_name = each_dir.name
    4747
    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)
    4951
    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)
    5156    if len(files_inside) != 3:
    5257        print(".idx, .iqdw or .ppdw file missing in", each_dir)
     
    5560    iqdw_file = (input_dir / each_dir / each_dir.stem).with_suffix('.iqdw')
    5661    ppdw_file = (input_dir / each_dir / each_dir.stem).with_suffix('.ppdw')
    57     print("PPDW file", ppdw_file)
     62    # print("PPDW file", ppdw_file)
    5863    idx_file = (input_dir / each_dir / each_dir.stem).with_suffix('.idx')
    5964
     
    6570    time_tuple = datetime.utcfromtimestamp(ts).timetuple()
    6671    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))
    6773    code_collection = database[input_dir.name]
    6874    year_collection = code_collection[str(time_tuple.tm_year)]
  • setup.cfg

    r27e3114 r5e84106  
    3131    numpy==1.21
    3232    setuptools>=52.0.0
    33 python_requires = >=3.10
     33python_requires = >=3.9
    3434package_dir =
    3535    =src
Note: See TracChangeset for help on using the changeset viewer.