Skip to content

Commit

Permalink
use uvfits file to update n_tile
Browse files Browse the repository at this point in the history
  • Loading branch information
PyxieLouStar authored and bhazelton committed Aug 15, 2024
1 parent 000baba commit 2b89a3b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions fhd_core/setup_metadata/fhd_struct_init_layout.pro
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ function fhd_struct_init_layout, ant_table_header, ant_table_data, $
diameters = ant_table_data.diameter
if n_elements(beam_fwhm) eq 0 and Tag_exist(ant_table_data, 'beamfwhm') then $
beam_fwhm = ant_table_data.beamfwhm

;; if n_antenna wasn't already set, calculate it from the antenna table data
if n_elements(n_antenna) eq 0 and n_elements(antenna_numbers) gt 0 then $
n_antenna = (size(antenna_numbers))[1]
endif

;; if no center given, assume MWA center (Tingay et al. 2013, converted from lat/lon using pyuvdata)
Expand Down
7 changes: 6 additions & 1 deletion fhd_core/setup_metadata/fhd_struct_init_obs.pro
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ git,'describe',result=code_version,repo_path=rootdir('fhd'),args='--long --dirty
IF N_Elements(code_version) GT 0 THEN code_version=code_version[0] ELSE code_version=''

IF N_Elements(n_pol) EQ 0 THEN n_pol=hdr.n_pol
n_tile=hdr.n_tile
IF Tag_exist(layout, "n_antenna") THEN BEGIN
n_tile=layout.n_antenna
ENDIF ELSE BEGIN
n_tile=hdr.n_tile
print, "Warning: n_tile not set from uvfits; using default of 128"
ENDELSE
n_freq=hdr.n_freq

speed_light=299792458.
Expand Down

0 comments on commit 2b89a3b

Please sign in to comment.