lsst-sims / legacy_sims_GalSimInterface

code to seamlessly generate simulated images using GalSim based off of simulated catalogs generated by CatSim
5 stars 7 forks source link

enable uniqueId strings to be written to centroid file #63

Closed jchiang87 closed 6 years ago

jchiang87 commented 6 years ago

This change supports using strings that are not cast-able as ints for object ids of instance catalog entries.

cwwalter commented 6 years ago

I guess formatting might not look good if there are other strings in there with very long SN names now.

cwwalter commented 6 years ago

Do you know the maximum length of a SN string yet?

jchiang87 commented 6 years ago

Actually, I think the SNe ids will be rather short, e.g., 'MS_587_6'...one of the advantages of allowing non-numeric characters.

cwwalter commented 6 years ago

Will it be added to the end of the uniqueId?

Currently the output looks like this:

SourceID                   Flux       xPix       yPix
470331623428        23781.15037    3824.62    3957.35
1605819826180        2504.62232    3984.03    3737.81
1704279223300        2190.84309    3996.09    3666.65

I was thinking if we knew the length we could up the 1st field width.

jchiang87 commented 6 years ago

@danielsf can say more definitively, but from the implementation, I inferred that strings like MS_587_6 will be the entire uniqueId.

danielsf commented 6 years ago

Jim is correct. As implemented now, the entire SN uniqueId is something like [survey name]_[healpix id]_[number within healpix]

danielsf commented 6 years ago

(MS == "main survey")

cwwalter commented 6 years ago

So, no way to tell about the connection to the host galaxy?

jchiang87 commented 6 years ago

That info is in the SN db that the instance catalog generation code reads.

cwwalter commented 6 years ago

That info is in the SN db that the instance catalog generation code reads.

Right, I was just wondering if that should be encoded in the uniqueID so you wouldn't need to go back and look at the DB to figure that out. But, if it isn't a important use case for users then it doesn't matter.