Closed ciskakemper closed 4 years ago
I really can't seem to reproduce this bug, I'm afraid. When I run the script I get a list returned which contains both an SL and an LL spectrum. Conversely, if I run it so that the file it is looking for doesn't exist, I get an error that the file doesn't exist. Can you include the terminal command you're executing, terminal output, and what version of astropy you are using?
Hi Peter, I have tried to run the script line by line, and it seems to go wrong for the first time when the variable filt is not defined in line 195 in data.py, when trying to read in the photometry data file. Can you look into this? The IRS spectrum seems to be read in fine. Thanks! Ciska
The shell command that I issued:
python3 pgQuasarSample.py
The screen output I got:
-2622.9229 -2183.1296 WARNING: W03: /home/ciska/work/src/ampere/examples/PGQuasars/PG1011-040/vizier_votable_prunedno2MASS.vot:16:0: W03: Implicitly generating an ID from a name '-out.form' -> '-out.form' [astropy.io.votable.xmlutil] WARNING: W27: /home/ciska/work/src/ampere/examples/PGQuasars/PG1011-040/vizier_votable_pruned_no2MASS.vot:30:2: W27: COOSYS deprecated in VOTable 1.2 [astropy.io.votable.tree] WARNING: W27: /home/ciska/work/src/ampere/examples/PGQuasars/PG1011-040/vizier_votable_pruned_no2MASS.vot:31:2: W27: COOSYS deprecated in VOTable 1.2 [astropy.io.votable.tree] WARNING: W06: /home/ciska/work/src/ampere/examples/PGQuasars/PG1011-040/vizier_votable_prunedno2MASS.vot:48:4: W06: Invalid UCD 'meta.table': Secondary word 'meta.table' is not valid as a primary word [astropy.io.votable.tree] Traceback (most recent call last): File "pgQuasarSample.py", line 26, in
phot = Photometry.fromFile(dataDir+photFile, libName = libname) File "/home/ciska/work/src/ampere/ampere/data.py", line 291, in fromFile self.fromTable(table, kwargs) File "/home/ciska/work/src/ampere/ampere/data.py", line 312, in fromTable self.init(filterName, value, uncertainty, photUnits, kwargs) File "/home/ciska/work/src/ampere/ampere/data.py", line 66, in init self.filterNamesToPyphot() File "/home/ciska/work/src/ampere/ampere/data.py", line 199, in filterNamesToPyphot newTry = [filt.astype(str).replace(':',' ').replace('/','_').replace('WISE','WISERSR').replace('Spitzer','SPITZER') for filt in self.filterName] File "/home/ciska/work/src/ampere/ampere/data.py", line 199, innewTry = [filt.astype(str).replace(':',' ').replace('/','_').replace('WISE','WISE_RSR').replace('Spitzer','SPITZER') for filt in self.filterName] AttributeError: 'str' object has no attribute 'astype'
This was partly due to not having python installed properly and partly due to the list needing an index. This can be reopened if someone encounters similar issues.
Line 64 in powerLawAGN.py is calling the Spectrum class
Line 666 in data.py calls the fromTable method, returning an empty list
Putting print statements in fromTable indicates that lines 670 to 692 are never executed.