Skip to content
Open
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
5 changes: 4 additions & 1 deletion src/s1reader/s1_burst_slc.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class represents a polynomial function of range

val, res, _, _ = np.linalg.lstsq(A, z, rcond=cond)
if len(res) > 0:
print("Chi squared: %f" % (np.sqrt(res / (1.0 * len(z)))))
print("Chi squared: %f" % np.sqrt(res / (1.0 * len(z))).item())
else:
print("No chi squared value....")
print("Try reducing rank of polynomial.")
Expand Down Expand Up @@ -1181,6 +1181,9 @@ def relative_orbit_number(self):
orbit_number_offset = 27
elif self.platform_id == "S1C":
orbit_number_offset = 172
elif self.platform_id == "S1D":
# Note: adjust in July 26 with cal. S1D
orbit_number_offset = 42
else:
raise ValueError(f"Unknown platform_id: {self.platform_id}")
return (self.abs_orbit_number - orbit_number_offset) % 175 + 1
2 changes: 1 addition & 1 deletion src/s1reader/s1_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def main():
all_files.append(path)
elif path.is_dir():
# Get all matching files within the directory
files = path.glob("S1[AB]_IW*")
files = path.glob("S1[ABCD]_IW*")
all_files.extend(list(sorted(files)))
else:
warnings.warn(f"{path} is not a file or directory. Skipping.")
Expand Down