Skip to content

SS/UVData read interaction #72

@mwilensky768

Description

@mwilensky768

Currently, the SS object overrides UVData.read by calling super().read and then performing SSINS-specific operations on the resulting data. This has a problematic interaction with the diff keyword when lists of files are given to read. The problem arises when UVData calls self.read recursively if diff defaults to True. This leads to data getting differenced multiple times. For this reason, diff is set to False by default, so that this cannot happen. This is a strange setting, since users are almost always going to need to explicitly set it to True. There is a warning explaining some of this when diff is set to False.

There are a couple options around this.

(1) Instead of overriding read, just make a new method called read_data that does the exact same thing, but doesn't end up getting called during UVData's recursive calls. Mildly annoying for backwards compatibility, but the easiest solution to implement.

(2) Find a way to figure out if read is being called recursively. I spent some time trying to figure out ways to do this, ranging from trying to set attributes when certain steps were complete to attempting to pull the stack. I don't recommend this way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    technical debtChange a quick solution to the right solution

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions