Display and inspect images without DB - EranOfek/AstroPack GitHub Wiki
- Assuming you would like to inspect specific images/catalogs and you know the mount, camera, fieldid, cropid, and date.
- You would like to mark up a specific coordinate.
- You would like to upload the specific images to ds9 and blink them.
- You would like to perform forced photometry on selected targets.
- You would like to report the forced photometry data as a report to the MPC
Assumptions:
- The image data disks are mounted to your computer.
The following function will search for relevant images taken during a specific night and upload them into a DS9analysis object.
Mount=5;
Camera=3;
Date=[12 10 2025];
FieldID=978;
CropID=6;
D9=pipeline.last.disp.ds9_nightFieldCrop(Mount, Camera, Date, FieldID, CropID);
The DS9analysis object contained in D9 contains the property Images, which is an AstroImage array with all the images taken during this night, with the specific properties (4 images in the above example).
The DS9analyis object also opened a ds9 display and upload the images to different buffers in ds9.
Note that the AstroImage object also contains the mask image, the PSF and the catalog data. For example, in order to see the PSF of the first image:
D9.Images(1).PSFData.surface
Or in order to get the JD of all the images:
JD=D9.Images.julday
You can also excess additional information (by click or by coordinates) using functions like: D9.getMask, D9.getBack, D9.getXY, D9.imexam, D9.moments, etc.
To mark specific known coordinates
RA = 347.68895; % deg
Dec = 2.93502; % deg
ds9.plotc(RA, Dec);
To delete the marker use:
ds9.delete_region
ds9.match_wcs
ds9.blink
%To stop blink mode - execute: ds9.single
ds9.single
In the frame you care about:
Phot=D9.forcedPhot
% click on the star of interest
The output is a table with the photometry information.
First, concat all the tables with forced photometry tables. Next you can use: imUtil.asteroids.generateReportMPC_ADES to generate an MPC report. Assuming the forced photometry table is in a variable Phot:
Nm = size(Phot,1);
Phot.AstIndex = ones(Nm,1); % asteroid index
[JD,ExpTime]=D9.Images.julday;
Phot.ExpTime = ExpTime(:);
Phot.SN = 1.086./Phot.MAGERR_PSF; % fix a bug: Issue: #738
Head = D9.Images.getStructKey('FWHM');
Phot.FWHM = [Head.FWHM]';
% add additional columns if needed:
% If needed, supply also the Submitter, Observer, Measurer, Comment, etc.
imUtil.asteroids.generateReportMPC_ADES(Phot, 'MyReport.xml');
Finally, you can submit the XML report in MyReport.xml via: MPC report submission.