API references¶
Help Functions¶
-
class
utilities.
help_functions
[source]¶ Helpfull function is a multipurpose class with a variety of function and tasks. It contains functions regarding error handling an file generation as well as generating ramps (e.g. for bias ramps) For more information see he docs for the functions itself
-
class
CAxisTime
(orientation, pen=None, linkView=None, parent=None, maxTickLength=-5, showValues=True)[source]¶ Over riding the tickString method by extending the class
-
create_new_file
(filename='default.txt', filepath='default_path', os_file=True, suffix='.txt')[source]¶ Simply creates a file
Parameters: - filename –
- filepath –
- os_file –
- suffix –
Returns:
-
flush_to_file
(file, message)[source]¶ Flushes data to a opend file Only strings or numbers allowed, Lists will work too but may cause data scrambling Only use this with created files from function ‘create_new_file’
-
get_thicks_for_timestamp_plot
(time_array, max_number_of_thicks=10, format='%H:%M:%S')[source]¶ This gives back a list of tuples for the thicks
-
int2dt
(ts, ts_mult=1000.0)[source]¶ Convert seconds value into datatime struct which can be used for x-axis labeeling
-
open_file
(filename='default.txt', filepath='default_path')[source]¶ Just opens a file and returns the file pointer
Returns: File
-
raise_exception
(method)[source]¶ Intended to be used as decorator for pyQt functions in the case that errors are not correctly passed to the python interpret
-
ramp_voltage
(VisaResource, instrument, order_code, max_value, ramp_steps, time_to_wait, ramp_up=True)[source]¶ Deprecated This function ramps a value by sending commands after a timeout. Usage, ramping voltage for a device
Parameters: - VisaResource – Device which gets the commands
- instrument –
- order_code – Code which has to be send
- max_value – Maximum value from where to be ramped
- ramp_steps – Stepssize
- time_to_wait – waitingtime
- ramp_up – Whether or not to ramp from abs up or down
Returns:
-
ramp_voltage_job
(queue, resource, order, voltage_Start, voltage_End, step, wait_time=0.2, complience=0.0001)[source]¶ Only use this function for simple ramping for the main, never inside a measurement!!!
-
read_from_file
(filename='default.txt', filepath='default_path')[source]¶ Gives you the content of the file in an list, each list entry is one line of the file (datatype=string) Warning: File gets closed after reading
-
run_with_lock
(method)[source]¶ Intended to be used as decorator for functions which need to be threadsave. Warning: all functions acquire the same lock, be carefull.
-
timeit
(method)[source]¶ Intended to be used as decorator for functions. It returns the time needed for the function to run
Parameters: method – method to be timed Returns: time needed by method
-
class
New Thread¶
-
class
utilities.
newThread
(threadID, name, object__, *args)[source]¶ Creates new threads easy, it needs the thread ID a name, the function/class, which should run in a seperated thread and the arguments passed to the object
LOG File¶
Framework¶
Transformation¶
Measurement Job Generation¶
-
class
utilities.
measurement_job_generation
(main_variables, queue_to_measurement_event_loop)[source]¶ This class handles all measurement generation items
-
generate_IVCV
(header)[source]¶ This function generates all that has to do with IV or CV :param header: An additional header :return: the job dictionary
-
Table control¶
-
class
utilities.
table_control_class
(main_variables, device, queue_to_GUI, shell)[source]¶ This class handles all interactions with the table. Movement, status etc. This class is designed to be running in different instances.
-
check_if_ready
(timeout=0, maxcounter=-1)[source]¶ This function checks if the movement of the table is done or not :param timeout: Timeout how long to wait between the attempts :param maxcounter: How often does the function try to get an answer, -1 infinite :return: 0 if ok error if not
-
check_position
(desired_pos)[source]¶ This function checks if two positions are equal or not
Parameters: desired_pos – The position it should be Returns: 0 if ok error if not
-
get_current_position
()[source]¶ Queries the current position of the table and writes it to the state machine
-
move_down
(lifting)[source]¶ This function moves the table down
Parameters: lifting – hight movement Returns: none or errorcode
-
move_to
(position, move_down=True, lifting=800, relative_move=False)[source]¶ This function moves the table to the desired position. position is a list of coordinates The move down parameter can prohibits a down and up movement with the move, !!!!USE WITH CARE!!!!
Returns: None or errorcode
-
move_to_strip
(pad_file, strip, transfomation_class, T, V0, height_movement=800)[source]¶ Moves to a specific strip
Parameters: - transfomation_class –
- height_movement – How much should the table move down
Returns: None or errorcode
-
move_up
(lifting)[source]¶ This function moves the table up
Parameters: lifting – hight movement Returns: none or errorcode
-
relative_move_to
(position, move_down=True, lifting=800)[source]¶ This function moves the table to the desired position (relative). position is a list of coordinates The move down parameter can prohibit a down and up movement with the move, !!!!USE WITH CARE!!!!
Returns: none or error code
-
Switching control¶
-
class
utilities.
switching_control
(settings, devices, queue_to_main, shell)[source]¶ This class handles all switching controls of all switching matrices
-
apply_specific_switching
(switching_dict)[source]¶ This function takes a dict of type {“Switching”: [/switch nodes], ….} and switches to these specific type
-
build_command
(device, command_tuple)[source]¶ Builds the command correctly, so that device recognise the command
Parameters: - device – device dictionary
- command_tuple – command, value
-
pick_switch_response
(device, current_switching)[source]¶ This function picks the string response and returns a list. :param current_switching: is a string containing the current switching
-