Author Topic: Return star array from StarDetector  (Read 578 times)

Offline dave_galera

  • PixInsight Addict
  • ***
  • Posts: 261
    • QDigital Astro
Return star array from StarDetector
« on: 2020 January 15 05:32:58 »
I am trying to get relevant information using the following after executing starDetector

stars.position.x, stars.position.y, stars.radius, stars.flux, stars.size, stars.bkg etc.

The .position and .radius are returning values however .flux, .size and .bkg are undefined and I get the following return:

{"position":{},"radius":5}

Question, is it possible to get the .flux, .size and .bkg values?

Thanks in anticipation
Dave

Offline dave_galera

  • PixInsight Addict
  • ***
  • Posts: 261
    • QDigital Astro
Re: Return star array from StarDetector
« Reply #1 on: 2020 January 15 05:57:45 »
OK so I know what I was doing wrong, I have sorted that problem and now I get:

{"position":{},"radius":4,"flux":0.01169074873905629}

But I still can't get .bkg using the following:

barycenters.push({
                  position: stars.pos,
                  radius: Math.max(3, Math.ceil(Math.sqrt(stars.size))),
                  flux: stars.flux,
                  bkg: stars.bkg
               });
Dave