Ejemplo n.º 1
0
def setup():
    # setup for the run
    # We've got some stuff that takes time here - gphoto2/camera interaction can be, uh, slow
    # so let's be nice and show as progress bar.... :)
    # TODO - yeah, I'm lazy
    # TODO - is this even needed anymore? Should be handled in the 'image' subcommand

    click.echo("Setting things up. Standby....")
    # the iterator for below
    iteration = 1  # we start at 1

    # init the camera
    if not no_init:
        camera.cam_init()

    # basic housekeeping
    camera.housekeeping()

    # show the camera state
    present_iso = camera.cam_state()

    # set the camera as we'd like it
    camera.cam_setup(iso)

    # verify the camera state
    present_iso = camera.cam_state()
Ejemplo n.º 2
0
def setup():
    # setup for the run
    # We've got some stuff that takes time here - gphoto2/camera interaction can be, uh, slow
    # so let's be nice and show as progress bar.... :)
    # TODO - yeah, I'm lazy
    # TODO - is this even needed anymore? Should be handled in the 'image' subcommand

    click.echo('Setting things up. Standby....')
    # the iterator for below
    iteration = 1  # we start at 1

    # init the camera
    if not no_init:
        camera.cam_init()

    # basic housekeeping
    camera.housekeeping()

    # show the camera state
    present_iso = camera.cam_state()

    # set the camera as we'd like it
    camera.cam_setup(iso)

    # verify the camera state
    present_iso = camera.cam_state()
Ejemplo n.º 3
0
def image(count, length, iso, img_prefix, no_init, stack, outdir, stack_prefix,
          mflat):
    """Automates bulb image captures using gphoto2 and libgphoto."""

    # setup for the run
    # We've got some stuff that takes time here - gphoto2/camera interaction can be, uh, slow
    # so let's be nice and show as progress bar.... :)

    click.echo('Setting things up. Standby....')

    #initialize a few things

    # the iterator for below
    iteration = 1  # we start at 1

    # set up for the live stack if that's what we're doing
    if stack:
        if not stack_prefix:
            stack_prefix = img_prefix
        if not outdir:
            outdir = img_prefix
        if not os.path.isdir(outdir):
            os.makedirs(outdir)
        if not os.path.exists(mflat):
            click.echo('Can\'t find master flat %s.' % mflat)
            quit()

    # init the camera
    if not no_init:
        camera.cam_init()

    # basic housekeeping
    camera.housekeeping()

    # show the camera state
    present_iso = camera.cam_state()

    # set the camera as we'd like it
    camera.cam_setup(iso)

    # verify the camera state
    present_iso = camera.cam_state()
    # time to image

    click.echo('Subs: %dx%d seconds @ ISO%s' % (count, length, present_iso))
    while count >= iteration:
        img = '%s%d.arw' % (img_prefix, iteration)
        camera.capture(length, count, img_prefix, iteration)
        camera.mv_capture(img_prefix, iteration)
        if stack:
            stacker.stacker(img, iteration, outdir, stack_prefix, mflat)
        iteration = iteration + 1
    if stack:
        stacker.cleanup()
Ejemplo n.º 4
0
def image(count, length, iso, img_prefix, no_init, stack, outdir, stack_prefix, mflat):
    """Automates bulb image captures using gphoto2 and libgphoto."""

    # setup for the run
    # We've got some stuff that takes time here - gphoto2/camera interaction can be, uh, slow
    # so let's be nice and show as progress bar.... :)

    click.echo("Setting things up. Standby....")

    # initialize a few things

    # the iterator for below
    iteration = 1  # we start at 1

    # set up for the live stack if that's what we're doing
    if stack:
        if not stack_prefix:
            stack_prefix = img_prefix
        if not outdir:
            outdir = img_prefix
        if not os.path.isdir(outdir):
            os.makedirs(outdir)
        if not os.path.exists(mflat):
            click.echo("Can't find master flat %s." % mflat)
            quit()

    # init the camera
    if not no_init:
        camera.cam_init()

    # basic housekeeping
    camera.housekeeping()

    # show the camera state
    present_iso = camera.cam_state()

    # set the camera as we'd like it
    camera.cam_setup(iso)

    # verify the camera state
    present_iso = camera.cam_state()
    # time to image

    click.echo("Subs: %dx%d seconds @ ISO%s" % (count, length, present_iso))
    while count >= iteration:
        img = "%s%d.arw" % (img_prefix, iteration)
        camera.capture(length, count, img_prefix, iteration)
        camera.mv_capture(img_prefix, iteration)
        if stack:
            stacker.stacker(img, iteration, outdir, stack_prefix, mflat)
        iteration = iteration + 1
    if stack:
        stacker.cleanup()