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

Timestamp fixes (1/1): Remove some unnecessary time axis copies #222

Merged
merged 3 commits into from
Apr 25, 2023
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
1 change: 0 additions & 1 deletion draco/analysis/sensitivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ def process(self, data):
# Create output container
metrics = containers.SystemSensitivity(
pol=np.array(pol_uniq, dtype="<U2"),
time=data.time[:],
axes_from=data,
attrs_from=data,
comm=data.comm,
Expand Down
8 changes: 0 additions & 8 deletions draco/analysis/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,6 @@ def process(self, ss):
ss_prod = ss.prod
ss_conj = np.zeros(ss_prod.size, dtype=bool)

# Add the time-like axis to the kwargs
output_kwargs = (
{"ra": ss.ra[:]}
if isinstance(ss, containers.SiderealStream)
else {"time": ss.time[:]}
)

# Create output container
sp = ss.__class__(
freq=bt_freq,
Expand All @@ -228,7 +221,6 @@ def process(self, ss):
copy_from=ss,
distributed=True,
comm=ss.comm,
**output_kwargs,
)

# Check if frequencies are already ordered
Expand Down
2 changes: 1 addition & 1 deletion draco/synthesis/gain.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def process(self, data):

time = data.time

gain_data = containers.GainData(time=time, axes_from=data, comm=data.comm)
gain_data = containers.GainData(axes_from=data, comm=data.comm)
gain_data.redistribute("input")

# Save some useful attributes
Expand Down