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

POINTING table is not filled #314

Open
bennahugo opened this issue Oct 2, 2020 · 3 comments
Open

POINTING table is not filled #314

bennahugo opened this issue Oct 2, 2020 · 3 comments
Labels

Comments

@bennahugo
Copy link
Contributor

As discussed elsewhere in calibration implementation the (compulsory) POINTING table is not being generated. This means that the pointing information (necessary for applying the far field response to a model) is lost on datasets that were rephased.

I suspect the following is never actually added into the generation of the dataset:

katdal/katdal/ms_extra.py

Lines 855 to 900 in 4898eaf

def populate_pointing_dict(num_antennas, observation_duration, start_time, phase_center, pointing_name='default'):
"""Construct a dictionary containing the columns of the POINTING subtable.
The POINTING subtable contains data on individual antennas tracking a target.
It has one row per pointing/antenna?
Parameters
----------
num_antennas : integer
Number of antennas
observation_duration : float
Length of observation, in seconds
start_time : float
Start time of observation, as a Modified Julian Date in seconds
phase_center : array of float, shape (2,)
Direction of phase center, in ra-dec coordinates as 2-element array
pointing_name : string, optional
Name for pointing
Returns
-------
pointing_dict : dict
Dictionary containing columns of POINTING subtable
"""
phase_center = phase_center.reshape((2, 1, 1))
pointing_dict = {}
# Antenna Id (integer)
pointing_dict['ANTENNA_ID'] = np.arange(num_antennas, dtype=np.int32)
# Antenna pointing direction as polynomial in time (double, 2-dim)
pointing_dict['DIRECTION'] = np.repeat(phase_center, num_antennas)
# Time interval (double)
pointing_dict['INTERVAL'] = np.tile(np.float64(observation_duration), num_antennas)
# Pointing position name (string)
pointing_dict['NAME'] = np.array([pointing_name] * num_antennas)
# Series order (integer)
pointing_dict['NUM_POLY'] = np.zeros(num_antennas, dtype=np.int32)
# Target direction as polynomial in time (double, -1-dim)
pointing_dict['TARGET'] = np.repeat(phase_center, num_antennas)
# Time interval midpoint (double)
pointing_dict['TIME'] = np.tile(np.float64(start_time), num_antennas)
# Time origin for direction (double)
pointing_dict['TIME_ORIGIN'] = np.tile(np.float64(start_time), num_antennas)
# Tracking flag - True if on position (boolean)
pointing_dict['TRACKING'] = np.ones(num_antennas, dtype=np.uint8)
return pointing_dict

image

@bennahugo bennahugo added the bug label Oct 2, 2020
@bennahugo
Copy link
Contributor Author

Relevant to issues ratt-ru/codex-africanus#227 and ratt-ru/QuartiCal#37

@ludwigschwardt
Copy link
Contributor

Thanks Ben, I just discovered this again for myself while helping out with reference pointing via CASA 😂

I guess I would like someone to tell me that I filled the table correctly. Any pointers to the correct values appreciated!

@bennahugo
Copy link
Contributor Author

@ludwigschwardt to first order I think this needs to be filled with requested pointing values per scan - this was quite a problem for the Lunar data (we manually built the table for the AIPS data to get the PA calculations working). I understand it is probably low on the rung so to speak - I just documented the issue so that we don't forget about it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants