astromatic / sextractor

Extract catalogs of sources from astronomical images
http://astromatic.net/software/sextractor
GNU General Public License v3.0
151 stars 44 forks source link

*Error*: wrong array syntax for keyword VECTOR_ASSOC #41

Open chriskervick opened 1 year ago

chriskervick commented 1 year ago

I am trying to use SExtractor to classify sources as stars/galaxies, and would like to use as inputs the x-y pixel positions of sources from a catalog I already have. I can get it to work fine when I only enable NUMBER_ASSOC in the parameter files. When I enable VECTOR_ASSOC instead, I get the error "Error: wrong array syntax for keyword VECTOR_ASSOC".

My ASSOC file consists of 2 columns, space delimited. I have set ASSOC_PARAMS to 1,2 and have set ASSOC_DATA to both 1,2 and 0 separately but neither seems to work. ASSOC_TYPE is set to NEAREST and I have tried all possible options for ASSOCSELEC_TYPE, but the error persists.

ebertin commented 1 year ago

Hi @chriskervick. This should not happen unless there is a wrong character somewhere. VECTOR_ASSOC can accept as an argument the number of ASSOC_DATA columns that will end up in the output catalog. If no argument is provided (or if VECTOR_ASSOC is without parentheses), only the first ASSOC_DATA column ends up in the catalog. For example, the default configuration for ASSOC_DATA is ASSOC_DATA 2,3,4 ; Using VECTOR_ASSOC(3) in the .param file would give you in that case the three columns. Using more than 3 would generate a warning. I hope this helps!