Open DHortaD opened 4 years ago
Forwarding to @jmackereth...
Hi @DHortaD - lets re-raise this over on my fork, and solve it over there.
actually.... I didn't realise you couldn't raise issues in forks. So when I find a solution, i'll post it here.
I believe this issue was a bug which was fixed in a commit that I hadn't yet pushed up (https://github.com/jobovy/apogee/commit/51b92092c106a40b0fbf777375b5fe042cddfa10). If you could pull the latest version and re-try, that would be great.
We just merged the DR14 and DR16 selection functions in 4e2a3e4, so if this is still relevant, please re-test.
Hey Jo,
I tried cloning Ted's apogee ap2sf apogee branch to run the updated selection function for APOGEE dr16, but I seem to get the following error:
""
Traceback (most recent call last): File "", line 1, in
File "/Users/qpasa/Desktop/apogee-halo/apogee/apogee/apogee/select/apogeeSelect.py", line 2169, in init
apo1sel = apogee1Select(year=self.apo1year, mjd=mjd, sample=sample, locations=ap1_locations, _justprocessobslog=_justprocessobslog)
File "/Users/qpasa/Desktop/apogee-halo/apogee/apogee/apogee/select/apogeeSelect.py", line 731, in init
self._load_spec_data(sample=sample, mjd=mjd)
File "/Users/qpasa/Desktop/apogee-halo/apogee/apogee/apogee/select/apogeeSelect.py", line 1664, in _load_spec_data
statIndx= self.determine_statistical(allStar, )
File "/Users/qpasa/Desktop/apogee-halo/apogee/apogee/apogee/select/apogeeSelect.py", line 1505, in determine_statistical
avisit= specdata['ALL_VISITS'][ii].split(',')[0].strip() #this is a visit ID
TypeError: a bytes-like object is required, not 'str'
""
Could it be that the file from which the selection function is reading has changed from a bytes to a string? it seems to me like a python2-python3 problem? I am running it on python3.
Cheers Danny