diff --git a/oceanstream/L0_unprocessed_data/raw_reader.py b/oceanstream/L0_unprocessed_data/raw_reader.py index 9b7da4d..6820ab6 100644 --- a/oceanstream/L0_unprocessed_data/raw_reader.py +++ b/oceanstream/L0_unprocessed_data/raw_reader.py @@ -418,62 +418,3 @@ def concatenate_files(file_dicts): list_of_datasets.append(_read_file(file_info["file_path"])) combined_dataset = ep.combine_echodata(list_of_datasets) return combined_dataset - - -# Additional functions... - - -if __name__ == "__main__": - # Code to be executed if this module is run as a standalone script - # For example, for testing purposes - - # Get list of files - path = r"C:\Users\mishu\OneDrive\Desktop\pinelab\test_data\ek60" - files_from_dir = file_finder(path) - files = [ - "JR161-D20061118-T010645.raw", - "JR161-D20061127-T115759.raw", - "JR161-D20061127-T144557.raw", - "JR177-D20080122-T151230.raw", - "JR177-D20080206-T100028.raw", - "JR177-D20080206-T101423.raw", - "JR177-D20080206-T124742.raw", - "JR177-D20080214-T220433.raw", - "JR179-D20080410-T133235.raw", - "JR179-D20080410-T142619.raw", - "JR179-D20080410-T143945.raw", - "JR179-D20080410-T145311.raw", - "JR179-D20080410-T150637.raw", - "JR230-D20091215-T121917.raw", - "JR245-D20110116-T182142.raw", - "JR245-D20110117-T213756.raw", - ] - file_paths = [os.path.join(path, f) for f in files] - files_found_from_list = file_finder(file_paths, "raw") - files_txt = file_finder(path, "txt") - print(files_txt) - # Check to be raw files integrity - raw_files_info = [] - for file in files_found_from_list: - file_info = file_integrity_checking(file) - if file_info["file_integrity"]: - raw_files_info.append(file_info) - # Try to read the files - # opened_raw_file = read_raw_files(files_info) - # Save files as ... - converted_file_paths = convert_raw_files(raw_files_info) - opened_converted_files = read_processed_files(converted_file_paths) - converted_files_info = [] - for converted_file in converted_file_paths: - file_info = file_integrity_checking(converted_file) - if file_info["file_integrity"]: - converted_files_info.append(file_info) - - contiguous_files_list = split_files(converted_files_info) - - for list_of_files in contiguous_files_list: - if len(list_of_files) > 1: - print(list_of_files) - combined_ed = concatenate_files(list_of_files) - print(combined_ed) - print(combined_ed["Top-level"])