import data_coolection as cool

# Supress warnings from EPICS
cool.hush()
c = cool.Coolector(session='Yttrium Tungstate tests',
                   sample='Monika',
                   #sample='DarkFrames',
                   sample_uid='NA',
                   location='Prototype lab',
                   operator='Haavard and Cyrille',
                   description='Calibrating irrad g-125 with PM100',
                   sub_experiment='No lens',
                   directory='/tmp/')
# Add devices
# c.attrs['Distance to lens aper'] = 37
# c.attrs['F-number'] = 4.0
# c.attrs['Distance to camera sensor'] = 39.5
# c.attrs['Distance to PM sensor'] = 38.5
# c.attrs['Distance units'] = 'cm'
# c.add_device(cool.Thorlabs_spectrometer('CCS1', sw_trig=True))
# cam = cool.Manta_cam('CAM1',
#                      sw_trig=True,
#                      exposure=0.002,
#                      gain=0,
#                      exposure_max=0.1)

# c.add_device(cam)
# c.add_device(cool.PM100('PM100', sw_trig=True))
c.add_device(cool.Thorlabs_spectrometer('CCS1', sw_trig=True))

with c:
示例#2
0
import data_coolection as cool
import time

# This supresses EPICS warnings. Remove if something is wrong.
cool.hush()

c = cool.Coolector(sample='HV1',
                   sample_uid='NA',
                   location='OCL',
                   operator='Haavard, Grey, Cyrille, Erik',
                   description='Temp sacn on HV1, no beam',
                   sub_experiment='',
                   directory='/tmp/')
# Add devices

# ps = cool.PicoscopePython(trig_per_min=6, sampling_interval=1e-7)
# c.add_device(ps)

cam = cool.Manta_cam('CAM1',
                     sw_trig=True,
                     exposure=0.04,
                     gain=0,
                     exposure_max=0.1)
c.add_device(cam)
c.add_device(cool.Thorlabs_spectrometer('CCS1', sw_trig=True, exposure=3.0))
cam.attrs['Distance to camera'] = 118.5
cam.attrs['Distance units'] = 'cm'
cam.attrs['F-number'] = 2.8

c.add_device(cool.SuperCool())
import data_coolection as cool
import h5py
import time
import matplotlib.pyplot as plt

# Supress warnings from EPICS
cool.hush()
c = cool.Coolector(sample='Dummy',
                   sample_uid='NA',
                   location='Prototype lab',
                   operator='Haavard',
                   session='Heating M1 with mount in the prototype',
                   description='Heating M1 with mount in the prototype',
                   sub_experiment='NA',
                   directory='/tmp/')
# Add devices
cam = cool.Manta_cam('CAM1', "Nikkor 600, f4", "600", "8", sw_trig=True,
                     exposure=.22, gain=0, exposure_max=1.5)
c.add_device(cam)

print('Added camera')
# plt.ion()
# plt.colorbar(0, 4096)
fig = plt.figure()

# # cam.auto_exposure()

def integrate_sq(image, minx, maxx, miny, maxy):
    width = image.shape[0]
    height = image.shape[1]
    # print(width, height)
示例#4
0
import data_coolection as cool
import time
# Supress warning s from EPICS
cool.hush()
c = cool.Coolector(
    sample='NA',
    sample_uid='NA',
    location='OCL',
    operator='Haavard and Cyrille',
    session='May \'19 OCL',
    description=
    'Stage scan, combustion sprayed samples, new Faraday cup, places 300um sample',
    sub_experiment='NA',
    nominal_beam_current=350.0e-9,
    directory='/var/data/ocl/2019-05-22/')
# directory='/tmp/')

cam_exposure = 0.15
ccs_exposure = 0.05

c.savedata.attrs['MeVs per proton'] = 0.5
# Add devices
cam = cool.Manta_cam('CAM1',
                     'Dummy',
                     50,
                     8.0,
                     sw_trig=False,
                     exposure=cam_exposure,
                     gain=0,
                     exposure_min=0.001,
                     exposure_max=1.0)
示例#5
0
import data_coolection as cool

# This supresses EPICS warnings. Remove if something is wrong.
cool.hush()

c = cool.Coolector(sample='HVC1.2',
                   sample_uid='NA',
                   location='OCL',
                   operator='Haavard, Grey, Cyrille, Erik',
                   description='Temp scan, 70nA',
                   sub_experiment='Yttria Vanadate and SNS',
                   directory='/var/data/ocl/2018-02-28/')

# Linear stage
stage = cool.LinearStage()
# stage.add_sample('YttriumVanadata', 0)
# stage.add_sample('SNS', 5100)
# stage.add_sample('HV1', 8500)
stage.add_sample('HVC1.2', 12800)
stage.move_stage('HVC1.2')

c.add_device(stage)

# 0     Yttrium vanadate
# 5100  SNS
# 8500  HV1
# 12800 HVC1.2

# Manta camera
cam = cool.Manta_cam('CAM1',
                     sw_trig=False,
示例#6
0
cool.hush()


def get_five_triggers(coolector):
    c.clear()
    for trig in range(5):
        print('Waiting for data!')
        c.wait_for_data()
        print(time.time())
        print("Got one! " + str(trig))


c = cool.Coolector(sample='HVC1.2',
                   sample_uid='NA',
                   location='OCL',
                   operator='Haavard, Grey, Cyrille',
                   description='Testing current readout with beam',
                   sub_experiment='100nA, testing file sizes',
                   directory='/var/data/ocl/2018-02-27/')
# Add devices
c.attrs['Distance to camera'] = 118.5
c.attrs['Distance units'] = 'cm'
c.attrs['F-number'] = 2.8
c.attrs['stage_position'] = moveStage.get_position()

moveStage.set_power_off_delay(0)

ps = cool.PicoscopePython(trig_per_min=10, sampling_interval=1e-7)

c.add_device(ps)