@@ -151,11 +151,11 @@ def test_object_extraction_stars(self):
151
151
phot_params ,
152
152
self .phosim_file )
153
153
154
- id_arr = np . zeros ( len (gs_object_arr ), dtype = int )
154
+ id_arr = [ None ] * len (gs_object_arr )
155
155
for i_obj in range (len (gs_object_arr )):
156
156
id_arr [i_obj ] = gs_object_arr [i_obj ].uniqueId
157
157
158
- truth_dtype = np .dtype ([('uniqueId' , int ), ('x_pupil' , float ), ('y_pupil' , float ),
158
+ truth_dtype = np .dtype ([('uniqueId' , str , 200 ), ('x_pupil' , float ), ('y_pupil' , float ),
159
159
('sedFilename' , str , 200 ), ('magNorm' , float ),
160
160
('raJ2000' , float ), ('decJ2000' , float ),
161
161
('pmRA' , float ), ('pmDec' , float ),
@@ -253,11 +253,11 @@ def test_object_extraction_galaxies(self):
253
253
phot_params ,
254
254
galaxy_phosim_file )
255
255
256
- id_arr = np . zeros ( len (gs_object_arr ), dtype = int )
256
+ id_arr = [ None ] * len (gs_object_arr )
257
257
for i_obj in range (len (gs_object_arr )):
258
258
id_arr [i_obj ] = gs_object_arr [i_obj ].uniqueId
259
259
260
- truth_dtype = np .dtype ([('uniqueId' , int ), ('x_pupil' , float ), ('y_pupil' , float ),
260
+ truth_dtype = np .dtype ([('uniqueId' , str , 200 ), ('x_pupil' , float ), ('y_pupil' , float ),
261
261
('sedFilename' , str , 200 ), ('magNorm' , float ),
262
262
('raJ2000' , float ), ('decJ2000' , float ),
263
263
('redshift' , float ), ('gamma1' , float ),
@@ -424,9 +424,10 @@ def test_validate_phosim_object_list(self):
424
424
message = wa [desired_warning_dex ].message .args [0 ]
425
425
426
426
# these are the objects that should be omitted
427
- bad_unique_ids = set ([34307989098524 , 811883374597 ,
427
+ bad_unique_ids = set ([str (x ) for x in
428
+ [34307989098524 , 811883374597 ,
428
429
811883374596 , 956090392580 ,
429
- 34307989098523 , 34304522113056 ])
430
+ 34307989098523 , 34304522113056 ] ])
430
431
431
432
self .assertIn ('Omitted 6 suspicious objects' , message )
432
433
self .assertIn ('4 had galactic_Av' , message )
0 commit comments