Closed cloud182 closed 1 year ago
Hi Enrico. Could you confirm pls that this bug is still there? Looking at the code it should not do that (as tablename is allocated during the init).
Hi Eric,
I think this error is fixed. However, an unrelated error arose in the new version:
Traceback (most recent call last):
File
"/data/beegfs/astro-storage/groups/schinnerer/PHANGS/MUSE/Test/Config_test_NGC253/v0/mosaicing.py",
line 36, in
just removing verbose=False in File "/home/congiu/miniconda3/envs/py31/lib/python3.10/site-packages/pymusepipe/combine.py", line 646, seems to do the job.
Cheers, Enrico
I also tried to read the table after saving it, and the following error arose:
File "/data/beegfs/astro-storage/groups/schinnerer/PHANGS/MUSE/Test/Config_test_NGC253/v0/mosaicing.py", line 41, in <module>
pt = PointingTable(input_table='test_pt.dat')
File "/home/congiu/miniconda3/envs/py31/lib/python3.10/site-packages/pymusepipe/util_image.py", line 1156, in __init__
if not os.path.exists(self.fullname):
AttributeError: 'PointingTable' object has no attribute 'fullname'. Did you mean: 'fullnameout'?```
Regarding the first one: there is no such thing as verbose on that line, so maybe a versioning issue?
For the second one, yes, a typo. Was fulltablename instead of fullname. Should have tested it. Hope there are no more... ;-)
Great thanks! I'll try to test it out!
Some follow-up errors
These following errors occurred when reading a pointing table in fits file format:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jneumann/pymusepipe/src/pymusepipe/util_image.py", line 1157, in __init__
self.read()
File "/home/jneumann/pymusepipe/src/pymusepipe/util_image.py", line 1379, in read
self.tablename = kwargs.pop("filename", self.filename)
AttributeError: 'PointingTable' object has no attribute 'filename'. Did you mean: 'tablename'?
Just commenting out line 1379 solved the issue . Next error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jneumann/pymusepipe/src/pymusepipe/util_image.py", line 1157, in __init__
self.read()
File "/home/jneumann/pymusepipe/src/pymusepipe/util_image.py", line 1383, in read
if not os.path.exists(self.fullname):
AttributeError: 'PointingTable' object has no attribute 'fullname'. Did you mean: 'fullnameout'?
Changing fullname to fulltablename solved the issue. Next error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jneumann/pymusepipe/src/pymusepipe/util_image.py", line 1157, in __init__
self.read()
File "/home/jneumann/pymusepipe/src/pymusepipe/util_image.py", line 1384, in read
qtable = QTable.read(self.fulltablename, format=self.table_format, guess=self.guess,
File "/home/jneumann/anaconda3/musedr/lib/python3.10/site-packages/astropy/table/connect.py", line 62, in __call__
out = self.registry.read(cls, *args, **kwargs)
File "/home/jneumann/anaconda3/musedr/lib/python3.10/site-packages/astropy/io/registry/core.py", line 212, in read
data = reader(*args, **kwargs)
TypeError: read_table_fits() got an unexpected keyword argument 'guess'
Reading the fits format doesn't take and doesn't need a format "guess".
For now, I just added an if self.table_format=='fits': qtable = QTable.read(self.fulltablename, format=self.table_format,**kwargs)
and else: qtable = QTable.read(self.fullname, format=self.table_format, guess=self.guess, **kwargs)
. This solved the issue for me. I leave it to you to do it nicer. :)
I made a few modifications. Clearly this was wrong/bugged, with spelling mistakes and problems of changed parameter names. Hope it does it now.
Hi Eric,
I was trying to save the pointing table, to manually remove some frames that I do not want in the mosaic. The code I used is the following:
however I get the following error:
Cheers, Enrico