export_traces.py 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import view
  2. # this tells view all settings including the folder structure of your project
  3. ymlfile = r"/home/aj/SharedWithWindows/HS_Till/usage_till.yml"
  4. # any manual changes to flags, add to dictionary as required
  5. flags_to_update = {
  6. "RM_ROITrace": 3
  7. }
  8. list_of_animals = [
  9. "HS_bee_PELM_180424b",
  10. "HS_bee_PELM_180416b"
  11. ]
  12. if __name__ == '__main__':
  13. # create a view object
  14. view_obj = view.VIEW()
  15. # load flags from yml file
  16. view_obj.update_flags_from_ymlfile(ymlfile)
  17. # update flags specified locally
  18. view_obj.update_flags(flags_to_update)
  19. # iterate over animals
  20. for animal in list_of_animals:
  21. # initialize view object with animal
  22. view_obj.initialize_animal(animal=animal)
  23. # iterate over measurements of the animal
  24. for measu in view_obj.get_measus_by_analyze_for_current_animal(1):
  25. # load a measurement for the animal
  26. view_obj.load_measurement_data_from_current_animal(measu)
  27. # save glodatamixes for the loaded data
  28. view_obj.export_glodatamix_for_current_measurement()
  29. view_obj.backup_script_flags_configs_for_GDMs(files=[__file__, ymlfile])