2baOrNot2ba / dreamBeam

Radio telescope beam modeling framework
https://dreambeam.readthedocs.io
ISC License
5 stars 6 forks source link

Missing Model Pickle Files (*.dpe.pkl) #4

Closed David-McKenna closed 4 years ago

David-McKenna commented 4 years ago

Hey Tobia,

Think I've hit a roadblock while trying to use your sample scripts. Running the pointing_jones.py script with the suggested parameters --

./scripts/pointing_jones.py print LOFAR LBA SE607 Hamaker 2012-04-01T01:02:03 60 1 6.11 1.02 60E6

Results in a stacktrace from a file not found error, it looks like the code path was introduced in 0.7 so there might have been a file or two not included in the release?

Traceback (most recent call last):
  File "./scripts/pointing_jones.py", line 224, in <module>
    cli_main()
  File "./scripts/pointing_jones.py", line 218, in cli_main
    main(telescope, stnid, band, antmodel, obstimebeg, duration, steptime,
  File "./scripts/pointing_jones.py", line 112, in main
    on_pointing_axis_tracking(telescopename, stnid, band, antmodel, bTime,
  File "/home/suddenly/.local/lib/python3.8/site-packages/dreamBeam-0.7-py3.8.egg/dreambeam/rime/scenarios.py", line 113, in on_pointing_axis_tracking
    stnfeed = load_mountedfeed(telescopename, stnid, band, antmodel)
  File "/home/suddenly/.local/lib/python3.8/site-packages/dreamBeam-0.7-py3.8.egg/dreambeam/telescopes/rt.py", line 44, in load_mountedfeed
    stnfeed = telescope_plugins[tscopename].getstationfeed(station, band,
  File "/home/suddenly/.local/lib/python3.8/site-packages/dreamBeam-0.7-py3.8.egg/dreambeam/telescopes/rt.py", line 112, in getstationfeed
    stndpolel = self.feedplugin.load_dpolel(band, modelname)
  File "/home/suddenly/.local/lib/python3.8/site-packages/dreamBeam-0.7-py3.8.egg/dreambeam/feeds/feedplugins.py", line 202, in load_dpolel
    dpolel = self._gen_dpolel_hamaker(band, version)
  File "/home/suddenly/.local/lib/python3.8/site-packages/dreamBeam-0.7-py3.8.egg/dreambeam/feeds/feedplugins.py", line 215, in _gen_dpolel_hamaker
    stndpolel = convLOFARcc2DPE(inppath, outpath)
  File "/home/suddenly/.local/lib/python3.8/site-packages/AntPat-0.4-py3.8.egg/antpat/reps/hamaker.py", line 389, in convLOFARcc2DPE
FileNotFoundError: [Errno 2] No such file or directory: '/home/suddenly/.local/lib/python3.8/site-packages/dreamBeam-0.7-py3.8.egg/dreambeam/telescopes/LOFAR/data/LBA-default.dpe.pkl'

A quick scan through the commit history I can't find any references to the dreambeam/telescopes/LOFAR/data/ folder or any *.dpe.pkl files, so hopefully it's just a quick fix to distribute the files on your end.

Cheers

2baOrNot2ba commented 4 years ago

Hi David, the idea is to create these dual-pol element models at runtime (i.e. first time, then subsequently taken from cache). I think a fix is to just create a directory under the 'LOFAR/' subdirectory called 'data/' because it expects there is such a directory to store data. I have pushed a fix, that you could try.

Thanks!

David-McKenna commented 4 years ago

Cheers Tobia, that seems to have solved this issue at least, but I've run into a new issue further down the execution stack unforetunately. I'll open a new issue with that, alongside a PR with another quick fix for a python2/3 error I've encountered