code: """
  example1.py
  
  "A simple example how to use the CubeSat-Power-Estimation tool."
  
  @author: Johan Monster (https://github.com/Hans-Bananendans/)
  """
  
  # Import packages
  import numpy as np
  import pandas as pd
  
  from mission import Mission
  
  # Defining the config
  config = {
      "years_passed" : 0, # How many [years] the satellite has been in space for
      
      "battery_capacity" : 81000, # Battery capacity in [W.s] (or: Joule)
      "battery_degradation_factor" : 0.04,
      "battery_init" : 0.5, # 0.5 = Battery begins at 50% charge
      
      "panel_degradation_factor" : 0.02,
      
      "blip_period" : 30, # Currently unused, telemetry blip period
      "blip_duration" : 1, # Currently unused, telemetry blip duration
      "no_blips" : ["downlink"], # Currently unused
      
      "orbital_altitude" : 550 # Orbital altitude in [km]
      }
  
  # List of the names of all used EPS channels.
  channels = ["None", "5V_1", "5V_2", "5V_3", "5V_4", "3.3V_1", \
              "3.3V_2", "3.3V_3", "3.3V_4", "Var_rail"]
  
  # Dict of typical voltage supplied to each channel.
  channel_voltages = {
      "5V_1" : 5, 
      "5V_2" : 5, 
      "5V_3" : 5, 
      "5V_4" : 5, 
      "3.3V_1" : 3.3,
      "3.3V_2" : 3.3,
      "3.3V_3" : 3.3,
      "3.3V_4" : 3.3,
      "Var_rail" : 6.5 # Can between 6.5-8 VDC, highest current is at 6.5V
      }
      
  # Dict specifiying which device is on which EPS channel
  device_channels = {
      "adcs"              : "5V_4",
      "payload_dice"      : "5V_3",
      "payload_bitflip"   : "3.3V_3",
      "antenna"           : "3.3V_4",
      "obc"               : "5V_2",
      "obc_board"         : "5V_2",
      "rx"                : "Var_rail",
      "tx"                : "Var_rail",
      "eps"               : "None",
      "sensors_1"         : "3.3V_2",
      "sensors_2"         : "3.3V_4",
      }
  
  # List of all possible OpStates the satellite can be in.
  # This list must be consistent with the specified power.xlsx
  state_list = ["idle","recharge","dice_payload","wheel_unloading", \
                "transponder","downlink","safe_mode","recovery_mode", \
                "detumbling_mode"]
  
  # Dict of which colour will be used for each OpState whilst plotting
  state_colours = {
      "idle"              : "#ffffff",
      "recharge"          : "#2ca02c",
      "dice_payload"      : "#8000ff",
      "wheel_unloading"   : "#0080ff",
      "transponder"       : "#ff8000",
      "downlink"          : "#ff0000",
      "safe_mode"         : "#4000ff",
      "recovery_mode"     : "#777777", 
      "detumbling_mode"   : "#ff00ff"
      }
  
  # Baby's first satellite schedule
  schedule1 = {
      0       : "idle",
      50      : "downlink",
      100     : "recharge"
      }
  
  # Loading the power frame, or the device/OpState table
  power_frame = pd.read_excel('power.xlsx',index_col=0)
  
  # Loading the two power input vectors, generated by CubeSat-Solar-Estimator
  p_sun = np.load("P_sun.npy")
  p_alb = np.load("P_alb.npy")
  
  # Assembling the mission object
  m1 = Mission(config, device_channels, state_list, channels, \
               power_frame, p_sun, p_alb)
  
  # Calling the Mission.propagate() method to start the simulation
  results = m1.propagate(schedule1, tsim=200, dt=1)
  
  # Plotting
  m1.plot_timeline_power(state_colours)
  
apis: numpy.load pandas.read_excel