version: "1.0"
experiment_profile_name: growth-curve
metadata:
  author: "Cole Arseneault"
  description: For running a basic growth curve experiment. Some documentation present in comments for values that could be changed depending on experiment. Meant as a one-click start for Biologists that may not have as much computational experience!
  
plugins:                                         # Note: Only keep if you have these add-ons
  - name: pioreactor-air-bubbler                  
    version: ">=0.13.1"
  - name: pioreactor-precision-temperature-plugin
    version: ">=0.2.13" 

common:                                          # Used to set all Pioreactor configs
  jobs:
    stirring:
      description: "Used for controlling stirring."
      actions:
        - type: start
          t: 0                                   # Turns on stirring at 0sec (immediately)
          options:
            target_rpm: 200                      # Can change to different rpm values (200rpm for 20mL works well)
          config_overrides:
            enable_dodging_od: true              # Ensure this is "true" for no bubbles during OD readings
            initial_target_rpm: 200              # If changed above, change here too
            tartget_rpm_outside_od_reading: 200  # Also change this too! (or make whatever you want new value to be)
            target_rpm_during_od_reading: 0      # Sets rpm to 0 when reading OD value
            pre_delay_duration: 1.5
            post_delay_duration: 0.5
        - type: stop
          t: 48h                                 # Turns off stirring at set time
    temperature_automation:
      description: "Turns on temperature gauge and heating."
      actions:
        - type: start
          t: 0                                   # Turns on temperature at 0sec (immediately)
          options:
            automation_name: thermostat
            target_temperature: 30               # Set temperature (in Celcius)
        - type: stop
          t: 48h                                 # Turn off temperature at set time
    od_reading:
      description: "Uses defaults OD reading values (NOTE: NOT OD600 values. Need to make calibration curve yourself for that)"
      actions:
        - type: start
          t: 0                                   # Turns on OD readings at 0sec (immediately)
          config_overrides:
            samples_per_second: 0.01667          # OD reading interval (Every min). Note: For math do 1/(# of seconds)
        - type: stop
          t: 48h                                 # Turns off OD reading at set time
    growth_curve:
      description: "Records values used to produce a growth curve and plots it."
      actions:
        - type: start
          t: 30m                                 # Turns on Growth curve. Note: takes ~30min to heat to 30 degrees
        - type: stop
          t: 48h                                 # Turns off Growth curve at set time
    air_bubbler:
      description: "Feeds oxygen to the cells in Pioreactor"
      actions:
        - type: start
          t: 10s                                 # Turns on Air bubbler after 10sec
          options:
            duty_cycle: 80
            hertz: 200
            enable_dodging_od: true              # Ensure this is "true" for no bubbles during OD readings
            burst_duration: 1                    # Bubbles made for 1sec
            rest_duration: 30                    # Interval between each bubbling (30sec)
          config_overrides:
            pre_delay_duration: 1.5
            post_delay_duration: 0.75 
        - type: stop
          t: 48h                                 # Turns off Air bubbler at set time

#pioreactors:                                    # For assigning specific variables (Ex. certain temp) for each Pioreactor. Remove "#" in front of each line to use.
#  pio001:                                       # Replace "pio001" with your Pioreactor id
#    jobs:
      