Skip to content

Commit

Permalink
Add emission function
Browse files Browse the repository at this point in the history
  • Loading branch information
axelpotier-astro committed Mar 5, 2025
1 parent cb7e48b commit 8cf9577
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions catkit2/testbed/proxies/nkt_superk.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,20 @@ def sleep_time_per_nm(self):
def base_sleep_time(self):
return self.config['base_sleep_time']

@property
def emission(self):
return self.emission.get()[0]

def turn_on(self):
emission = self.emission.get()[0]
emission = self.emission
if emission is False:
self.emission.submit_data(np.array([1], dtype='uint8'))
print('NKT turned ON')
else:
print('NKT already ON')

def turn_off(self):
emission = self.emission.get()[0]
emission = self.emission
if emission is True:
self.emission.submit_data(np.array([0], dtype='uint8'))
print('NKT turned OFF')
Expand Down

0 comments on commit 8cf9577

Please sign in to comment.