The run_complete_resistivity_manual() function in fast_hall_controller.py currently fails silently if the user incorrectly inputs the sample_type parameter. In this case, the measurement is never started (execution skips by the if and elif blocks), and the function will return whatever resistivity results are stored on the instrument from any previous measurements.
This creates a difficult situation to debug; measurement results are being returned to the user but no measurements are actually being run. This could be fixed by adding an else block to throw a ValueError if the user enters an invalid sample_type. Here is the relevant snippet of code from the current version on github:
def run_complete_resistivity_manual(self, settings, sample_type):
"""Performs a manual resistivity measurement and then returns the corresponding measurement results.
Args:
settings(ResistivityManualParameters):
Object with settings for manual resistivity setup.
sample_type(str):
Indicates sample type. Options are: "VDP" (Van der Pauw sample), or "HBAR" (Hall Bar sample).
Returns:
The measurement results as a dictionary.
"""
# Run specific measurement based on sample type
if sample_type == "VDP":
self.start_resistivity_vdp(settings)
elif sample_type == "HBAR":
self.start_resistivity_hbar(settings)
# Loop until measurement has stopped running
while self.get_resistivity_running_status():
pass
# Collect and return results
results = self.get_resistivity_measurement_results()
return results
The
run_complete_resistivity_manual()
function in fast_hall_controller.py currently fails silently if the user incorrectly inputs thesample_type
parameter. In this case, the measurement is never started (execution skips by the if and elif blocks), and the function will return whatever resistivity results are stored on the instrument from any previous measurements.This creates a difficult situation to debug; measurement results are being returned to the user but no measurements are actually being run. This could be fixed by adding an else block to throw a ValueError if the user enters an invalid
sample_type
. Here is the relevant snippet of code from the current version on github: