# CATPARAMS -- Set or modify catalog parameters procedure t_catparams () pointer catalog # Catalog to modify pointer image # Image pointer arfl # Area file bool newcatalog # New catalog? real skyhw # Sky sigma real thrln0 # High detection threshold real thrln1 # Low detection threshold int minarea # Minimum detection area real magfst # Magnitude zero point real rfca # Radius of fixed circular aperture real satr # Saturation value real sig # Significance threshold pointer filter # Detection filter file pointer transform # Coordinate transform file pointer psffile # PSF file pointer classfile # Classification file int i, j pointer sp bool clgetb() int clgeti(), nowhite(), gstrmatch(), access() real clgetr() begin call smark (sp) call salloc (catalog, SZ_FNAME, TY_CHAR) call salloc (image, SZ_FNAME, TY_CHAR) call salloc (arfl, SZ_FNAME, TY_CHAR) call salloc (filter, SZ_FNAME, TY_CHAR) call salloc (transform, SZ_FNAME, TY_CHAR) call salloc (psffile, SZ_FNAME, TY_CHAR) call salloc (classfile, SZ_FNAME, TY_CHAR) call clgstr ("catalog", Memc[catalog], SZ_FNAME) call clgstr ("image", Memc[image], SZ_FNAME) call clgstr ("arfile", Memc[arfl], SZ_FNAME) if (nowhite (Memc[arfl], Memc[arfl], SZ_FNAME) == 0) { call strcpy (Memc[catalog], Memc[arfl], 6) if (gstrmatch (Memc[arfl], "\.cat$", i, j) > 0) Memc[arfl+i-1] = EOS call strcat (".ar", Memc[arfl], SZ_FNAME) } newcatalog = clgetb ("newcatalog") if (newcatalog) { if (access (Memc[catalog], 0) == YES) call delete (Memc[catalog]) if (access (Memc[arfl], 0) == YES) call delete (Memc[arfl]) } skyhw = clgetr ("sigma") thrln0 = clgetr ("hthreshold") thrln1 = clgetr ("lthreshold") magfst = clgetr ("magzero") minarea = clgeti ("minarea") rfca = clgetr ("aperture") satr = clgetr ("saturation") sig = clgetr ("significance") call clgstr ("filter", Memc[filter], SZ_FNAME) call clgstr ("transform", Memc[transform], SZ_FNAME) call clgstr ("psf", Memc[psffile], SZ_FNAME) call clgstr ("classification", Memc[classfile], SZ_FNAME) call strpak (Memc[catalog], Memc[catalog], SZ_FNAME) call strpak (Memc[image], Memc[image], SZ_FNAME) call strpak (Memc[arfl], Memc[arfl], SZ_FNAME) call strpak (Memc[filter], Memc[filter], SZ_FNAME) call strpak (Memc[transform], Memc[transform], SZ_FNAME) call strpak (Memc[psffile], Memc[psffile], SZ_FNAME) call strpak (Memc[classfile], Memc[classfile], SZ_FNAME) call catparams (Memc[catalog], Memc[image], Memc[arfl], satr, magfst, rfca, thrln0, thrln1, skyhw, minarea, sig, Memc[filter], Memc[transform], Memc[psffile], Memc[classfile]) call sfree (sp); end