Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpecWriterCallback2: assign write_new_scan_header in constructor #1033

Merged
merged 1 commit into from
Oct 29, 2024
Merged
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
2 changes: 1 addition & 1 deletion apstools/callbacks/spec_file_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,7 @@ def __init__(self, *args, **kwargs):
self.file_epoch = None
self.spec_filename = None
self.write_new_file_header = True
self.write_new_scan_header = False

def descriptor(self, doc):
"""
Expand Down Expand Up @@ -887,7 +888,6 @@ def newfile(self, filename=None, scan_id=None, RE=None):
self.spec_epoch = int(time.time()) # ! no roundup here!!!
self.spec_host = socket.gethostname() or "localhost"
self.spec_user = getpass.getuser() or "BlueskyUser"
self.write_new_header = True # don't write the file yet

# backwards-compatibility
if isinstance(scan_id, bool):
Expand Down