psferguson / chrysomallos

linking stars to observational selection functions through ssi
GNU General Public License v3.0
1 stars 0 forks source link

Adjust x/y_cen ranges to never hit the edge of a patch #13

Open psferguson opened 8 months ago

psferguson commented 8 months ago

Currently we configure the x/y_cen and then uniformly sample that. We could create centers where the postage stamp would go off the edge of the patch.

This function

def get_pix_cen_ranges(self, bbox): self.x_cen_range = [ bbox.beginX + int(self.stamp_x_size / 2), bbox.endX - int(self.stamp_x_size / 2), ] self.y_cen_range = [ bbox.beginY + int(self.stamp_y_size / 2), bbox.endY - int(self.stamp_y_size / 2), ]

when given a bbox will return the x/y_cen range to fit in that bbox

Currently not sure where to add this since the patch need to be defined and the bbox read in before we do this.