Skip to content

Commit

Permalink
Misc L3 updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
schlafly committed Oct 24, 2024
1 parent 9b25a18 commit 45d51c0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion romanisim/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def add_objects_to_image(image, objlist, xpos, ypos, psf,
if rng is None:
rng = galsim.UniformDeviate(seed)

log.info('Adding sources to image...')
log.info(f'Adding {len(objlist)} sources to image...')
nrender = 0

chromatic = False
Expand Down
1 change: 1 addition & 0 deletions romanisim/l3.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@ def simulate_cps(image, filter_name, efftimes, objlist=None, psf=None,
objlist = []
if len(objlist) > 0 and xpos is None:
if isinstance(objlist, table.Table):
objlist = romanisim.image.trim_objlist(objlist, image)
coord = np.array([[o['ra'], o['dec']] for o in objlist])
else:
coord = np.array([[o.sky_pos.ra.deg, o.sky_pos.dec.deg]
Expand Down
4 changes: 2 additions & 2 deletions scripts/romanisim-make-l3
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ if __name__ == '__main__':
center = util.celestialcoord(SkyCoord(ra=r * u.deg, dec=d * u.deg))
twcs = wcs.create_tangent_plane_gwcs(
(midpoint, midpoint), pixscale, center)
cat = Table.read(args.catalog)
cat = ris.create_catalog(catalog_name=args.catalog)

metadata = dict()
if args.date is not None:
metadata['basic'] = dict(time_mean_mjd=Time(args.date, format='isot'))
metadata['basic'] = dict(time_mean_mjd=Time(args.date, format='isot').mjd)
metadata['filename'] = os.path.basename(args.filename)

im, extras = l3.simulate(
Expand Down

0 comments on commit 45d51c0

Please sign in to comment.