Closed StuartLittlefair closed 6 years ago
I think I need to prevent it getting into this state in the first place, i.e I should limit the maximum shift. Quite tricky to ensure in the general case with multiple reference stars.
Stu, I have put some checks on the positions from the moving aperture section such that the error condition is raised in any aperture moves too close to edge of a window. I believe that this should prevent reduce getting into this state. Do you have a convenient test set of data? NB I haven't tested this!!
I have a test set, but it's far from convenient - it's the MAXI 1820 dataset and it takes a long time to copy anywhere, let alone reduce! Maybe you can publish to a branch on GitHub and I can fetch that branch and test it here?
thought it might be. Like an idiot I have just implemented it on the main branch. Is this the maxi dataset from a while back? I have the data, so perhaps just send me the aperture file etc
not a problem, I'll try the code you've got on the master branch
Problems....
"""
Traceback (most recent call last):
File "/Users/sl/anaconda3/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/Users/sl/anaconda3/lib/python3.6/multiprocessing/pool.py", line 47, in starmapstar
return list(itertools.starmap(args[0], args[1]))
File "/Users/sl/anaconda3/lib/python3.6/site-packages/hipercam/scripts/reduce.py", line 3039, in ccdproc
moveApers(cnam, ccd, flat, rflat, ccdaper, ccdwins, rfile, store)
File "/Users/sl/anaconda3/lib/python3.6/site-packages/hipercam/scripts/reduce.py", line 1794, in moveApers
'Fitted position ({:.1f},{:.1f}) too close or outside window = {!s}'.format(x,y,fwdata.winhead())
TypeError: 'Winhead' object is not callable
"""