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

Catalogue source not working #11

Open
daniestevez opened this issue Jul 9, 2021 · 2 comments
Open

Catalogue source not working #11

daniestevez opened this issue Jul 9, 2021 · 2 comments

Comments

@daniestevez
Copy link
Contributor

I have noticed that the catalogue sources in ATA Track Scan are not working. For instance, when using casa as the source, I get

Press Enter to quit: /source got error: Command failed - Unable to lookup source casa - Source object lookup failed - PredictServer not ready/initialized
handler caught exception: Command failed - Unable to lookup source casa - Source object lookup failed - PredictServer not ready/initialized
Traceback (most recent call last):
 File "/home/destevez/.local/lib/python3.8/site-packages/ATATools/ata_rest.py", line 71, in _do_op
   raise ATARestException(json[cls.RETURN_MSG_KEY])
ATATools.ata_rest.ATARestException: Command failed - Unable to lookup source casa - Source object lookup failed - PredictServer not ready/initialized

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
 File "/home/destevez/gnuradio/gr38_uhd4/lib/python3/dist-packages/gnuradio/gr/gateway.py", line 78, in eval
   try: self._callback(arg)
 File "/home/destevez/gnuradio/gr38_uhd4/lib/python3/dist-packages/ata/control.py", line 142, in handle_msg
   self.point_src_id(self.obs_info['source_id'], self.my_ants)
 File "/home/destevez/gnuradio/gr38_uhd4/lib/python3/dist-packages/ata/control.py", line 265, in point_src_id
   src_ra, src_dec = ac.get_source_ra_dec(src_id)
 File "/home/destevez/.local/lib/python3.8/site-packages/ATATools/ata_control.py", line 170, in get_source_ra_dec
   source_data = ATARest.get(endpoint, json={'source': source})
 File "/home/destevez/.local/lib/python3.8/site-packages/ATATools/ata_rest.py", line 94, in get
   return cls._do_op(cls._OP_GET, endpoint, **kwargs)
 File "/home/destevez/.local/lib/python3.8/site-packages/ATATools/ata_rest.py", line 78, in _do_op
   raise ATARestException(str(e))
ATATools.ata_rest.ATARestException: Command failed - Unable to lookup source casa - Source object lookup failed - PredictServer not ready/initialized
^Cthread[thread-per-block[0]: <block ATA Control(3)>]: SWIG director method error. Error detected when calling 'feval_p.eval

Usually I'm using ac.track_source(antennas, source='casa') for catalogue pointing, but I think this doesn't support indicating an offset for on-off scanning.

@wfarah
Copy link
Contributor

wfarah commented Jul 12, 2021

Hi @daniestevez. I haven't yet looked into this issue, but what I currently use for my observations is another function: ac.make_and_track_ephems. There's another procedure for on/off, but I think you've already used that?

@daniestevez
Copy link
Contributor Author

@wfarah suggested using

az_offset = 20.
el_offset = 0.
ata_control.create_ephems2(source, az_offset, el_offset)
ata_control.point_ants2(source, "off", ant_list)
ata_control.point_ants2(source, "on", ant_list)

for on-off scanning. I have see that this is precisely what gr-ata does.

In fact the problem is not with the tracking itself, but rather with a call to ac.get_source_ra_dec(), which is only used to check if the source is up (if it isn't an error is printed instead of trying to track). I'm going to submit a PR that disables this call and assumes that the source is up as a quick way of getting this working.

I wonder if there is another way of getting the RADEC of catalogue sources. I would suggest astropy, but the names of the objects often don't match the names in the ATA catalogue.

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

No branches or pull requests

2 participants