Skip to content

Commit

Permalink
Merge pull request #173 from rasg-affiliates/fix_ska_profile
Browse files Browse the repository at this point in the history
Fix hard-coded dish size in from_ska method
  • Loading branch information
DanielaBreitman authored Feb 24, 2025
2 parents c79681f + 8aee63a commit 15952dd
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/py21cmsense/data/profiles/HERA-H1C-IDR3.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
antpos: !astropy.units.Quantity
value: !txt "{{ DATA_PATH }}/antpos/hera-h1c-idr3.txt"
value: !txt '{{ DATA_PATH }}/antpos/hera-h1c-idr3.txt'
unit: !astropy.units.Unit {unit: m}
beam:
class: GaussianBeam
Expand Down
2 changes: 1 addition & 1 deletion src/py21cmsense/data/profiles/MWA-PhaseII.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
antpos: !astropy.units.Quantity
value: !txt "{{ DATA_PATH }}/antpos/mwa_phase2_compact_antpos.txt"
value: !txt '{{ DATA_PATH }}/antpos/mwa_phase2_compact_antpos.txt'
unit: !astropy.units.Unit {unit: m}
beam:
class: GaussianBeam
Expand Down
2 changes: 1 addition & 1 deletion src/py21cmsense/data/profiles/SKA-LOW1-central.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
antpos: !astropy.units.Quantity
value: !txt "{{ DATA_PATH }}/antpos/layout_enu_ska_central.txt"
value: !txt '{{ DATA_PATH }}/antpos/layout_enu_ska_central.txt'
unit: !astropy.units.Unit {unit: m}
beam:
class: GaussianBeam
Expand Down
2 changes: 1 addition & 1 deletion src/py21cmsense/data/profiles/SKA-LOW1-core.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
antpos: !astropy.units.Quantity
value: !txt "{{ DATA_PATH }}/antpos/layout_enu_ska_core.txt"
value: !txt '{{ DATA_PATH }}/antpos/layout_enu_ska_core.txt'
unit: !astropy.units.Unit {unit: m}
beam:
class: GaussianBeam
Expand Down
4 changes: 3 additions & 1 deletion src/py21cmsense/observatory.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,9 @@ def from_ska(
else:
raise ValueError("array_type must be 'low' or 'mid'.")
antpos = subarray.array_config.xyz.data * un.m
_beam = beam.GaussianBeam(frequency=frequency, dish_size=35.0 * un.m)
_beam = beam.GaussianBeam(
frequency=frequency, dish_size=np.array(subarray.array_config.diameter)[0] * un.m
)
lat = subarray.array_config.location.lat.rad * un.rad
return cls(antpos=antpos, beam=_beam, latitude=lat, Trcv=Trcv)

Expand Down
2 changes: 1 addition & 1 deletion src/py21cmsense/sensitivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def calculate_sensitivity_2d(
if sample:
total_std = sample_std = 1 / np.sqrt(
self._nsamples_2d["sample"][k_perp][mask]
* (self.observation.time_per_day / self.observation.beam_crossing_time).to("")
* (self.observation.time_per_day / self.observation.lst_bin_size).to("")
)
if thermal and sample:
total_std = thermal_std + sample_std
Expand Down

0 comments on commit 15952dd

Please sign in to comment.