GithubHelp home page GithubHelp logo

sxccdtest: NX=10 and NY=10 ??? about indi HOT 8 CLOSED

indilib avatar indilib commented on July 22, 2024
sxccdtest: NX=10 and NY=10 ???

from indi.

Comments (8)

polakovic avatar polakovic commented on July 22, 2024

You're definitely right and feel free to do it. It was never meant as an example, just testing tool for interface library and it is far from perfect code. Peter

from indi.

teuben avatar teuben commented on July 22, 2024

It was perfect for me, except that confusion. I got a bit frustrated with other code, and with this code I was able to wrap it into an ascii PGM file, using the P2 header, followed by NX and NY and peak value, then all rows, and imagemagic convert it to a fits file, and i could see that it worked! That inspired me to clarify the NX and NY issue. Every beginner is confused about row major and column major storage, and there's also the issue of where 0,0 even is :-)

from indi.

teuben avatar teuben commented on July 22, 2024

There are two sections where the pixels are written to cout. In the 2nd section the camIndex is 1, instead of 0. This is where only NXNY bytes are read, instead of 2NX*NY when camIndex is 0. That didn't seem correct to me.

from indi.

polakovic avatar polakovic commented on July 22, 2024

Second section works with 8bit/pixel guider head (camindex = 1).

from indi.

teuben avatar teuben commented on July 22, 2024

thanks! and one final query: where is the exposure time hidden? Is that the 900 ms in sxSetTimer ? I don't have the camera with me today, but will test tomorrow.

from indi.

polakovic avatar polakovic commented on July 22, 2024

In this particular case it is hidden in usleep(1000) at lines 113 and 136 - computer timed mode is used.

Camera has also built-in timer for camera timed mode for short (about 3s) exposure times. In this case you have instead of sxClearPixels/sxLatchPixels/sxReadPixels sequence use just sxExposePixels/sxReadPixels.

Actually, it is not so easy as it looks from sxccdtest.cpp, in real driver you need to measure and handle difference between odd and even frames for interlaced cameras, flush 3s before readout for long exposures etc.

from indi.

polakovic avatar polakovic commented on July 22, 2024

Maybe you can also look at this:

https://github.com/indigo-astronomy/indigo/blob/master/indigo_drivers/ccd_sx/indigo_ccd_sx.c

it is slightly different approach, but it may help you to understand how to handle different camera modes.

from indi.

knro avatar knro commented on July 22, 2024

Looks like issue is considered resolved.

from indi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.