Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/sorunlib/seq.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def _stop_scan():
print("Scan finished.")


def scan(description, stop_time, width, az_drift=0, type=1, el_amp=None,
def scan(description, stop_time, width, az_drift=0, scan_type=1, el_amp=None,
tag=None, subtype=None, min_duration=None, **kwargs):
"""Run a constant elevation scan, collecting detector data.

Expand All @@ -37,10 +37,10 @@ def scan(description, stop_time, width, az_drift=0, type=1, el_amp=None,
current position and move in the positive azimuth direction.
az_drift (float): Drift velocity in deg/s, causing scan extrema to move
accordingly.
type (int): Scan type. Possible values are 1, 2, or 3.
scan_type (int): Scan type. Possible values are 1, 2, or 3.
el_amp (float): For type 3 scans, the amplitude (half
peak-to-peak) for the elevation oscillation, in degrees.
Must be specified if type=3 (but can be zero).
Must be specified if scan_type=3 (but can be zero).
tag (str, optional): Tag or comma-separated listed of tags to attach to
the operation. Passed through to the smurf stream command.
subtype (str, optional): Operation subtype used to tag the stream.
Expand All @@ -65,7 +65,7 @@ def scan(description, stop_time, width, az_drift=0, type=1, el_amp=None,
return

# It is an error to not declare el_amp when you specify type 3 scan.
assert (type != 3 or el_amp is not None)
assert (scan_type != 3 or el_amp is not None)

acu = run.CLIENTS['acu']

Expand All @@ -78,7 +78,7 @@ def scan(description, stop_time, width, az_drift=0, type=1, el_amp=None,
az = resp.session['data']['StatusDetailed']['Azimuth current position']
el = resp.session['data']['StatusDetailed']['Elevation current position']

if type == 3:
if scan_type == 3:
el1 = el - el_amp
el2 = el + el_amp
else:
Expand All @@ -93,7 +93,7 @@ def scan(description, stop_time, width, az_drift=0, type=1, el_amp=None,
el_endpoint2=el2,
el_speed=0,
az_drift=az_drift,
type=type,
scan_type=scan_type,
**kwargs)
check_started(acu, resp)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_seq.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_scan_types(patch_clients):
for scan_type, el_amp in [(2, None), (3, 1.)]:
# This affects test runtime duration keep it short
target = dt.datetime.now(dt.timezone.utc) + dt.timedelta(seconds=0.01)
seq.scan(description='test', type=scan_type, el_amp=el_amp,
seq.scan(description='test', scan_type=scan_type, el_amp=el_amp,
stop_time=target.isoformat(), width=20.)


Expand Down