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.
Currently, the
SSobject overridesUVData.readby callingsuper().readand then performing SSINS-specific operations on the resulting data. This has a problematic interaction with thediffkeyword when lists of files are given toread. The problem arises whenUVDatacallsself.readrecursively ifdiffdefaults toTrue. This leads to data getting differenced multiple times. For this reason,diffis set toFalseby default, so that this cannot happen. This is a strange setting, since users are almost always going to need to explicitly set it toTrue. There is a warning explaining some of this whendiffis set toFalse.There are a couple options around this.
(1) Instead of overriding
read, just make a new method calledread_datathat does the exact same thing, but doesn't end up getting called duringUVData's recursive calls. Mildly annoying for backwards compatibility, but the easiest solution to implement.(2) Find a way to figure out if
readis 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.