mirror of
https://github.com/eddyem/CCD_Capture.git
synced 2025-12-06 02:35:13 +03:00
fix some bugs & add some features
This commit is contained in:
parent
a9ddbc39b8
commit
d113aee650
@ -1,16 +1,21 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
set(PROJ ccd_capture)
|
||||
project(${PROJ})
|
||||
set(MINOR_VERSION "0")
|
||||
set(MID_VERSION "0")
|
||||
set(MAJOR_VERSION "1")
|
||||
set(VERSION "${MAJOR_VERSION}.${MID_VERSION}.${MINOR_VERSION}")
|
||||
|
||||
project(${PROJ} VERSION ${VERSION} LANGUAGES C)
|
||||
|
||||
message("VER: ${VERSION}")
|
||||
|
||||
# default flags
|
||||
set(CFLAGS ${CFLAGS} -Wall -W -Wextra -O3 -std=gnu99)
|
||||
add_definitions(-D_XOPEN_SOURCE=1234 -D_DEFAULT_SOURCE -D_GNU_SOURCE)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -W -Wextra -std=gnu99")
|
||||
|
||||
add_definitions(-D_XOPEN_SOURCE=1234 -D_DEFAULT_SOURCE -D_GNU_SOURCE -DLOCALEDIR=\"${LOCALEDIR}\"
|
||||
-DPACKAGE_VERSION=\"${VERSION}\" -DGETTEXT_PACKAGE=\"${PROJ}\"
|
||||
-DMINOR_VERSION=\"${MINOR_VERSION}\" -DMID_VERSION=\"${MID_VERSION}\"
|
||||
-DMAJOR_VERSION=\"${MAJOR_VESION}\")
|
||||
|
||||
set(CMAKE_COLOR_MAKEFILE ON)
|
||||
|
||||
@ -18,17 +23,28 @@ set(SOURCES main.c cmdlnopts.c ccdfunc.c)
|
||||
|
||||
# cmake -DDEBUG=yes -> debugging
|
||||
if(DEFINED DEBUG AND DEBUG STREQUAL "yes")
|
||||
set(CFLAGS ${CFLAGS} -Werror)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Og -ggdb -fno-builtin-strlen -Werror")
|
||||
add_definitions(-DEBUG)
|
||||
set(CMAKE_BUILD_TYPE DEBUG)
|
||||
set(CMAKE_VERBOSE_MAKEFILE "ON")
|
||||
else()
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -march=native -fdata-sections -ffunction-sections")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--gc-sections")
|
||||
set(CMAKE_BUILD_TYPE RELEASE)
|
||||
endif()
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
find_package(CFITSIO REQUIRED)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(${PROJ} REQUIRED usefull_macros)
|
||||
|
||||
include(FindOpenMP)
|
||||
if(OPENMP_FOUND)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
|
||||
add_definitions(-DOMP_FOUND)
|
||||
endif()
|
||||
|
||||
if(DEFINED IMAGEVIEW AND IMAGEVIEW STREQUAL "yes")
|
||||
list(APPEND SOURCES events.c imageview.c)
|
||||
find_package(OpenGL REQUIRED)
|
||||
@ -91,10 +107,6 @@ add_executable(${PROJ} ${SOURCES} ${PO_FILE} ${MO_FILE})
|
||||
target_link_libraries(${PROJ} ${CFITSIO_LIBRARIES} ${X11_LIBRARIES} ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${${PROJ}_LIBRARIES} -lm)
|
||||
include_directories(${${PROJ}_INCLUDE_DIRS} .)
|
||||
link_directories(${${PROJ}_LIBRARY_DIRS} )
|
||||
add_definitions(${CFLAGS} -DLOCALEDIR=\"${LOCALEDIR}\"
|
||||
-DPACKAGE_VERSION=\"${VERSION}\" -DGETTEXT_PACKAGE=\"${PROJ}\"
|
||||
-DMINOR_VERSION=\"${MINOR_VERSION}\" -DMID_VERSION=\"${MID_VERSION}\"
|
||||
-DMAJOR_VERSION=\"${MAJOR_VESION}\")
|
||||
|
||||
# Installation of the program
|
||||
INSTALL(FILES ${MO_FILE} DESTINATION "share/locale/ru/LC_MESSAGES")
|
||||
|
||||
@ -5,17 +5,6 @@ set(DUMMYLIB ${CCDLIB} PARENT_SCOPE)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(${CCDLIB} REQUIRED usefull_macros)
|
||||
|
||||
set(CFLAGS -O3 -Wextra -Wall -W -std=gnu99)
|
||||
set(CMAKE_COLOR_MAKEFILE ON)
|
||||
|
||||
if(DEFINED DEBUG AND DEBUG STREQUAL "yes")
|
||||
set(CFLAGS ${CFLAGS} -Werror)
|
||||
add_definitions(-DEBUG)
|
||||
set(CMAKE_VERBOSE_MAKEFILE "ON")
|
||||
endif()
|
||||
|
||||
add_definitions(${CFLAGS})
|
||||
|
||||
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} SRC)
|
||||
add_library(${CCDLIB} ${SRC})
|
||||
target_link_libraries(${CCDLIB} ${${CCDLIB}_LIBRARIES})
|
||||
|
||||
@ -38,7 +38,7 @@ static capture_status capstat = CAPTURE_NO;
|
||||
static int campoll(capture_status *st, float *remain){
|
||||
if(capstat == CAPTURE_NO){
|
||||
if(st) *st = capstat = CAPTURE_PROCESS;
|
||||
if(remain) *remain = 0.5;
|
||||
if(remain) *remain = 1e-6;
|
||||
}else{
|
||||
capstat = CAPTURE_NO;
|
||||
if(st) *st = CAPTURE_READY;
|
||||
@ -48,11 +48,15 @@ static int campoll(capture_status *st, float *remain){
|
||||
}
|
||||
|
||||
static int camcapt(IMG *ima){
|
||||
static int n = 0;
|
||||
if(!ima || !ima->data) return FALSE;
|
||||
uint16_t *d = ima->data;
|
||||
for(int y = 0; y < ima->h; ++y)
|
||||
for(int x = 0; x < ima->w; ++x) // sinusoide 100x200
|
||||
*d++ = (uint16_t)(sin(x * 50/M_PI)*sin(y * 100/M_PI)*65535.);
|
||||
for(int x = 0; x < ima->w; ++x){ // sinusoide 100x200
|
||||
//*d++ = (uint16_t)(((n+x)%100)/99.*65535.);
|
||||
*d++ = (uint16_t)((1 + sin((n+x) * M_PI/50)*sin((n+y) * M_PI/100))*32767.);
|
||||
}
|
||||
++n;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
@ -5,17 +5,6 @@ set(FLILIB ${CCDLIB} PARENT_SCOPE)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(${CCDLIB} REQUIRED fli>=1.71 usefull_macros)
|
||||
|
||||
set(CFLAGS -O3 -Wextra -Wall -W -std=gnu99)
|
||||
set(CMAKE_COLOR_MAKEFILE ON)
|
||||
|
||||
if(DEFINED DEBUG AND DEBUG STREQUAL "yes")
|
||||
set(CFLAGS ${CFLAGS} -Werror)
|
||||
add_definitions(-DEBUG)
|
||||
set(CMAKE_VERBOSE_MAKEFILE "ON")
|
||||
endif()
|
||||
|
||||
add_definitions(${CFLAGS})
|
||||
|
||||
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} SRC)
|
||||
add_library(${CCDLIB} ${SRC})
|
||||
target_link_libraries(${CCDLIB} ${${CCDLIB}_LIBRARIES})
|
||||
|
||||
@ -634,36 +634,37 @@ static int fli_fpfalse(_U_ float *f){ return FALSE; }
|
||||
*/
|
||||
Camera FLIcam = {
|
||||
.check = fli_findCCD,
|
||||
.setDevNo = fli_setActiceCam,
|
||||
.close = fli_closecam,
|
||||
.pollcapture = fli_pollcapt,
|
||||
.capture = fli_capt,
|
||||
.cancel = fli_cancel,
|
||||
|
||||
.setbin = fli_setbin,
|
||||
.setgeometry = fli_setgeometry,
|
||||
.setnflushes = fli_setnflushes,
|
||||
.setT = fli_settemp,
|
||||
.setio = fli_setio,
|
||||
// setters:
|
||||
.setDevNo = fli_setActiceCam,
|
||||
.setbrightness = fli_ffalse,
|
||||
.setexp = fli_setexp,
|
||||
.setgain = fli_ffalse,
|
||||
.setT = fli_settemp,
|
||||
.setbin = fli_setbin,
|
||||
.setnflushes = fli_setnflushes,
|
||||
.shuttercmd = fli_shutter,
|
||||
.confio = fli_confio,
|
||||
.setio = fli_setio,
|
||||
.setframetype = fli_setframetype,
|
||||
.setbitdepth = fli_setbitdepth,
|
||||
.setfastspeed = fli_setfastspeed,
|
||||
.setgeometry = fli_setgeometry,
|
||||
.setfanspeed = fli_setfanspd,
|
||||
.shuttercmd = fli_shutter,
|
||||
.confio = fli_confio,
|
||||
|
||||
// getters:
|
||||
.getbrightness = fli_fpfalse,
|
||||
.getModelName = fli_modelname,
|
||||
.getbin = fli_getbin,
|
||||
.getgain = fli_fpfalse,
|
||||
.getmaxgain = fli_fpfalse,
|
||||
.getgeomlimits = fli_geomlimits,
|
||||
.getTcold = fli_getTcold,
|
||||
.getThot = fli_getThot,
|
||||
.getTbody = fli_getTbody,
|
||||
.getbin = fli_getbin,
|
||||
.getio = fli_getio,
|
||||
.getgeomlimits = fli_geomlimits,
|
||||
|
||||
.setbrightness = fli_ffalse,
|
||||
.setgain = fli_ffalse,
|
||||
.getmaxgain = fli_fpfalse,
|
||||
.geometry = {0},
|
||||
};
|
||||
|
||||
|
||||
@ -5,17 +5,6 @@ set(ZWOLIB ${CCDLIB} PARENT_SCOPE)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(${CCDLIB} REQUIRED usefull_macros)
|
||||
|
||||
set(CFLAGS -O3 -Wextra -Wall -W -std=gnu99)
|
||||
set(CMAKE_COLOR_MAKEFILE ON)
|
||||
|
||||
if(DEFINED DEBUG AND DEBUG STREQUAL "yes")
|
||||
set(CFLAGS ${CFLAGS} -Werror)
|
||||
add_definitions(-DEBUG)
|
||||
set(CMAKE_VERBOSE_MAKEFILE "ON")
|
||||
endif()
|
||||
|
||||
add_definitions(${CFLAGS})
|
||||
|
||||
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} SRC)
|
||||
add_library(${CCDLIB} ${SRC})
|
||||
target_link_libraries(${CCDLIB} ${${CCDLIB}_LIBRARIES} -lASICamera2)
|
||||
|
||||
127
ccdfunc.c
127
ccdfunc.c
@ -33,6 +33,7 @@
|
||||
#ifdef IMAGEVIEW
|
||||
#include "imageview.h"
|
||||
#endif
|
||||
#include "omp.h"
|
||||
|
||||
Camera *camera = NULL;
|
||||
Focuser *focuser = NULL;
|
||||
@ -256,24 +257,40 @@ cloerr:
|
||||
}
|
||||
|
||||
static void calculate_stat(IMG *image){
|
||||
long i, Noverld = 0L, size = image->h*image->w;
|
||||
float pv, sum=0., sum2=0., sz = (float)size;
|
||||
uint16_t *ptr = image->data, val;
|
||||
uint64_t Noverld = 0L, size = image->h*image->w;
|
||||
double sum = 0., sum2 = 0.;
|
||||
uint16_t max = 0, min = 65535;
|
||||
for(i = 0; i < size; i++, ptr++){
|
||||
val = *ptr;
|
||||
pv = (float) val;
|
||||
#pragma omp parallel
|
||||
{
|
||||
uint16_t maxpriv = 0, minpriv = 65535;
|
||||
uint64_t ovrpriv = 0;
|
||||
double sumpriv = 0., sum2priv = 0.;
|
||||
#pragma omp for nowait
|
||||
for(uint64_t i = 0; i < size; ++i){
|
||||
uint16_t val = image->data[i];
|
||||
float pv = (float) val;
|
||||
sum += pv;
|
||||
sum2 += (pv * pv);
|
||||
if(max < val) max = val;
|
||||
if(min > val) min = val;
|
||||
if(val >= 65530) Noverld++;
|
||||
if(val >= 65530) ovrpriv++;
|
||||
}
|
||||
#pragma omp critical
|
||||
{
|
||||
if(max < maxpriv) max = maxpriv;
|
||||
if(min > minpriv) min = minpriv;
|
||||
sum += sumpriv;
|
||||
sum2 += sum2priv;
|
||||
Noverld += ovrpriv;
|
||||
}
|
||||
}
|
||||
double sz = (float)size;
|
||||
double avr = sum/sz;
|
||||
image->avr = avr;
|
||||
image->std = sqrt(fabs(sum2/sz - avr*avr));
|
||||
if(GP->verbose){
|
||||
printf(_("Image stat:\n"));
|
||||
float avr = sum/sz;
|
||||
printf("avr = %.1f, std = %.1f, Noverload = %ld\n", image->avr = avr,
|
||||
image->std = sqrt(fabs(sum2/sz - avr*avr)), Noverld);
|
||||
printf("avr = %.1f, std = %.1f, Noverload = %ld\n", avr, image->std, Noverld);
|
||||
printf("max = %u, min = %u, size = %ld\n", max, min, size);
|
||||
}
|
||||
}
|
||||
@ -427,6 +444,22 @@ static void closeall(){
|
||||
if(wheel){wheel->close(); wheel = NULL;}
|
||||
}
|
||||
|
||||
static capture_status capt(){
|
||||
capture_status cs;
|
||||
float tleave, tmpf;
|
||||
while(camera->pollcapture(&cs, &tleave)){
|
||||
if(cs != CAPTURE_PROCESS) break;
|
||||
verbose(2, _("%.1f seconds till exposition ends"), tleave);
|
||||
if(camera->getTcold(&tmpf)) verbose(1, "CCDTEMP=%.1f", tmpf);
|
||||
if(camera->getTbody(&tmpf)) verbose(1, "BODYTEMP=%.1f", tmpf);
|
||||
if(tleave > 6.) sleep(5);
|
||||
else if(tleave > 0.9) sleep((int)(tleave+0.99));
|
||||
else usleep((int)(1e6*tleave) + 1);
|
||||
if(!camera) return CAPTURE_ABORTED;
|
||||
}
|
||||
return cs;
|
||||
}
|
||||
|
||||
/*
|
||||
* Find CCDs and work with each of them
|
||||
*/
|
||||
@ -516,10 +549,6 @@ void ccds(){
|
||||
}
|
||||
if(GP->exptime < 0.) goto retn;
|
||||
/*********************** expose control ***********************/
|
||||
#ifdef IMAGEVIEW
|
||||
windowData *mainwin = NULL;
|
||||
if(GP->showimage) imageview_init();
|
||||
#endif
|
||||
// cancel previous exp
|
||||
camera->cancel();
|
||||
int binh = 1, binv = 1;
|
||||
@ -562,25 +591,28 @@ void ccds(){
|
||||
|
||||
uint16_t *img = MALLOC(uint16_t, raw_width * raw_height);
|
||||
IMG ima = {.data = img, .w = raw_width, .h = raw_height};
|
||||
#ifdef IMAGEVIEW
|
||||
windowData *mainwin = NULL;
|
||||
if(GP->showimage){
|
||||
imageview_init();
|
||||
DBG("Create new win");
|
||||
mainwin = createGLwin("Sample window", raw_width, raw_height, NULL);
|
||||
if(!mainwin){
|
||||
WARNX(_("Can't open OpenGL window, image preview will be inaccessible"));
|
||||
}else
|
||||
pthread_create(&mainwin->thread, NULL, &image_thread, (void*)&ima);
|
||||
}
|
||||
#endif
|
||||
for(int j = 0; j < GP->nframes; ++j){
|
||||
// úÁÈ×ÁÔ ËÁÄÒÁ %d\n
|
||||
verbose(1, _("Capture frame %d"), j);
|
||||
capture_status cs;
|
||||
float tleave = 1.;
|
||||
while(camera->pollcapture(&cs, &tleave)){
|
||||
if(cs != CAPTURE_PROCESS) break;
|
||||
verbose(2, _("%.1f seconds till exposition ends"), tleave);
|
||||
if(camera->getTcold(&tmpf)) verbose(1, "CCDTEMP=%.1f", tmpf);
|
||||
if(camera->getTbody(&tmpf)) verbose(1, "BODYTEMP=%.1f", tmpf);
|
||||
if(tleave > 6.) sleep(5);
|
||||
else if(tleave > 0.9) sleep((int)(tleave+0.99));
|
||||
else usleep((int)(1e6*tleave) + 99999);
|
||||
}
|
||||
if(cs != CAPTURE_READY){
|
||||
if(!camera) return;
|
||||
if(capt() != CAPTURE_READY){
|
||||
WARNX(_("Can't capture image"));
|
||||
break;
|
||||
}
|
||||
verbose(2, _("Read grabbed image"));
|
||||
if(!camera) return;
|
||||
if(!camera->capture(&ima)){
|
||||
WARNX(_("Can't grab image"));
|
||||
break;
|
||||
@ -589,14 +621,6 @@ void ccds(){
|
||||
saveFITS(&ima, GP->outfile);
|
||||
#ifdef IMAGEVIEW
|
||||
if(GP->showimage){ // display image
|
||||
if(!(mainwin = getWin())){
|
||||
DBG("Create new win");
|
||||
mainwin = createGLwin("Sample window", raw_width, raw_height, NULL);
|
||||
if(!mainwin){
|
||||
WARNX(_("Can't open OpenGL window, image preview will be inaccessible"));
|
||||
}else
|
||||
pthread_create(&mainwin->thread, NULL, &image_thread, (void*)&ima);
|
||||
}
|
||||
if((mainwin = getWin())){
|
||||
DBG("change image");
|
||||
change_displayed_image(mainwin, &ima);
|
||||
@ -604,10 +628,19 @@ void ccds(){
|
||||
if((mainwin->winevt & WINEVT_PAUSE) == 0) break;
|
||||
if(mainwin->winevt & WINEVT_GETIMAGE){
|
||||
mainwin->winevt &= ~WINEVT_GETIMAGE;
|
||||
if(!camera->capture(&ima)){
|
||||
WARNX(_("Can't grab image"));
|
||||
if(!camera) return;
|
||||
if(capt() != CAPTURE_READY){
|
||||
WARNX(_("Can't capture image"));
|
||||
}else{
|
||||
if(!camera) return;
|
||||
if(!camera->capture(&ima)){
|
||||
WARNX(_("Can't grab image"));
|
||||
}
|
||||
else{
|
||||
calculate_stat(&ima);
|
||||
change_displayed_image(mainwin, &ima);
|
||||
}
|
||||
}
|
||||
change_displayed_image(mainwin, &ima);
|
||||
}
|
||||
usleep(10000);
|
||||
}
|
||||
@ -621,24 +654,34 @@ void ccds(){
|
||||
verbose(1, _("%d seconds till pause ends\n"), (int)delta);
|
||||
if(camera->getTcold(&tmpf)) verbose(1, "CCDTEMP=%.1f\n", tmpf);
|
||||
if(camera->getTbody(&tmpf)) verbose(1, "BODYTEMP=%.1f\n", tmpf);
|
||||
if(delta > 10) sleep(10);
|
||||
if(delta > 6.) sleep(5);
|
||||
else if(delta > 0.9) sleep((int)(delta+0.99));
|
||||
else usleep((int)(delta*1e6 + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef IMAGEVIEW
|
||||
if(GP->showimage){
|
||||
mainwin->winevt |= WINEVT_PAUSE;
|
||||
if(mainwin) mainwin->winevt |= WINEVT_PAUSE;
|
||||
DBG("Waiting");
|
||||
while((mainwin = getWin())){
|
||||
if(mainwin->killthread) break;
|
||||
if(mainwin->winevt & WINEVT_GETIMAGE){
|
||||
DBG("GRAB");
|
||||
mainwin->winevt &= ~WINEVT_GETIMAGE;
|
||||
if(!camera->capture(&ima)){
|
||||
WARNX(_("Can't grab image"));
|
||||
if(!camera) return;
|
||||
if(capt() != CAPTURE_READY){
|
||||
WARNX(_("Can't capture image"));
|
||||
}else{
|
||||
if(!camera) return;
|
||||
if(!camera->capture(&ima)){
|
||||
WARNX(_("Can't grab image"));
|
||||
}
|
||||
else{
|
||||
calculate_stat(&ima);
|
||||
change_displayed_image(mainwin, &ima);
|
||||
}
|
||||
}
|
||||
change_displayed_image(mainwin, &ima);
|
||||
}
|
||||
}
|
||||
DBG("Close window");
|
||||
|
||||
14
events.c
14
events.c
@ -38,7 +38,7 @@ static void processKeybrd(unsigned char key, int mod, _U_ int x, _U_ int y){
|
||||
case 's': // save image
|
||||
win->winevt |= WINEVT_SAVEIMAGE;
|
||||
break;
|
||||
case 'q': // exit case 17:
|
||||
case 'q': // exit
|
||||
win->killthread = 1;
|
||||
break;
|
||||
}
|
||||
@ -49,14 +49,17 @@ static void processKeybrd(unsigned char key, int mod, _U_ int x, _U_ int y){
|
||||
win->zoom = 1;
|
||||
win->x = 0; win->y = 0;
|
||||
break;
|
||||
case 27: // esc - kill
|
||||
win->killthread = 1;
|
||||
break;
|
||||
//case 27: // esc - kill
|
||||
// win->killthread = 1;
|
||||
//break;
|
||||
case 'c': // capture in pause mode
|
||||
DBG("winevt = %d", win->winevt);
|
||||
if(win->winevt & WINEVT_PAUSE)
|
||||
win->winevt |= WINEVT_GETIMAGE;
|
||||
break;
|
||||
case 'e': // equalize/not equalize
|
||||
win->winevt |= WINEVT_EQUALIZE;
|
||||
break;
|
||||
case 'l': // flip left-right
|
||||
win->flip ^= WIN_FLIP_LR;
|
||||
break;
|
||||
@ -163,13 +166,14 @@ typedef struct{
|
||||
#define ALT_K(key) (key | (GLUT_ACTIVE_ALT<<8))
|
||||
static const menuentry entries[] = {
|
||||
{"Capture in pause mode (c)", 'c'},
|
||||
{"Switch histogram equalization (e)", 'e'},
|
||||
{"Flip image LR (l)", 'l'},
|
||||
{"Flip image UD (u)", 'u'},
|
||||
{"Make a pause/continue (p)", 'p'},
|
||||
{"Restore zoom (0)", '0'},
|
||||
{"Roll colorfun (ctrl+r)", CTRL_K('r')},
|
||||
{"Save image (ctrl+s)", CTRL_K('s')},
|
||||
{"Close this window (ESC)", 27},
|
||||
//{"Close this window (ESC)", 27},
|
||||
{"Quit (ctrl+q)", CTRL_K('q')},
|
||||
{NULL, 0}
|
||||
};
|
||||
|
||||
83
imageview.c
83
imageview.c
@ -19,15 +19,18 @@
|
||||
#include <X11/Xlib.h> // XInitThreads();
|
||||
#include <math.h> // roundf(), log(), sqrt()
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <usefull_macros.h>
|
||||
|
||||
#include "ccdfunc.h"
|
||||
#include "cmdlnopts.h"
|
||||
#include "imageview.h"
|
||||
#include "omp.h"
|
||||
|
||||
static windowData *win = NULL; // main window
|
||||
static pthread_t GLUTthread = 0; // main GLUT thread
|
||||
|
||||
static int imequalize = TRUE;
|
||||
static int initialized = 0; // ==1 if GLUT is initialized; ==0 after clear_GL_context
|
||||
|
||||
static void *Redraw(_U_ void *p);
|
||||
@ -112,13 +115,17 @@ int killwindow(){
|
||||
// say threads to die
|
||||
win->killthread = 1;
|
||||
}
|
||||
pthread_mutex_lock(&win->mutex);
|
||||
//DBG("Lock mutex");
|
||||
//pthread_mutex_lock(&win->mutex);
|
||||
//pthread_join(win->thread, NULL); // wait while thread dies
|
||||
if(win->menu) glutDestroyMenu(win->menu);
|
||||
if(win->menu){
|
||||
DBG("Destroy menu");
|
||||
glutDestroyMenu(win->menu);
|
||||
}
|
||||
DBG("Destroy window");
|
||||
glutDestroyWindow(win->ID);
|
||||
DBG("destroy menu, wundow & texture %d", win->Tex);
|
||||
DBG("Delete textures");
|
||||
glDeleteTextures(1, &(win->Tex));
|
||||
glutLeaveMainLoop();
|
||||
DBG("Cancel");
|
||||
windowData *old = win;
|
||||
win = NULL;
|
||||
@ -126,7 +133,7 @@ int killwindow(){
|
||||
FREE(old->image->rawdata);
|
||||
DBG("free(image)");
|
||||
FREE(old->image);
|
||||
pthread_mutex_unlock(&old->mutex);
|
||||
//pthread_mutex_unlock(&old->mutex);
|
||||
DBG("free(win)");
|
||||
FREE(old);
|
||||
DBG("return");
|
||||
@ -289,9 +296,12 @@ void clear_GL_context(){
|
||||
FNAME();
|
||||
if(!initialized) return;
|
||||
initialized = 0;
|
||||
cancel(); // cancel expositions
|
||||
DBG("kill");
|
||||
killwindow();
|
||||
DBG("join");
|
||||
DBG("Leave mainloop");
|
||||
glutLeaveMainLoop();
|
||||
if(GLUTthread) pthread_join(GLUTthread, NULL); // wait while main thread exits
|
||||
DBG("main GL thread cancelled");
|
||||
}
|
||||
@ -362,6 +372,7 @@ typedef enum{
|
||||
COLORFN_LINEAR, // linear
|
||||
COLORFN_LOG, // ln
|
||||
COLORFN_SQRT, // sqrt
|
||||
COLORFN_POW, // power
|
||||
COLORFN_MAX // end of list
|
||||
} colorfn_type;
|
||||
|
||||
@ -370,23 +381,31 @@ static colorfn_type ft = COLORFN_LINEAR;
|
||||
// all colorfun's should get argument in [0, 1] and return in [0, 1]
|
||||
static double linfun(double arg){ return arg; } // bung for PREVIEW_LINEAR
|
||||
static double logfun(double arg){ return log(1.+arg) / 0.6931472; } // for PREVIEW_LOG [log_2(x+1)]
|
||||
static double powfun(double arg){ return arg * arg;}
|
||||
static double (*colorfun)(double) = linfun; // default function to convert color
|
||||
|
||||
static void change_colorfun(colorfn_type f){
|
||||
DBG("New colorfn: %d", f);
|
||||
const char *cfn = NULL;
|
||||
ft = f;
|
||||
switch (f){
|
||||
case COLORFN_LOG:
|
||||
colorfun = logfun;
|
||||
ft = COLORFN_LOG;
|
||||
cfn = "log";
|
||||
break;
|
||||
case COLORFN_SQRT:
|
||||
colorfun = sqrt;
|
||||
ft = COLORFN_SQRT;
|
||||
cfn = "sqrt";
|
||||
break;
|
||||
case COLORFN_POW:
|
||||
colorfun = powfun;
|
||||
cfn = "square";
|
||||
break;
|
||||
default: // linear
|
||||
colorfun = linfun;
|
||||
ft = COLORFN_LINEAR;
|
||||
cfn = "linear";
|
||||
}
|
||||
verbose(1, _("Histogram conversion: %s"), cfn);
|
||||
}
|
||||
|
||||
// cycle switch between palettes
|
||||
@ -407,13 +426,25 @@ static uint8_t *equalize(uint16_t *ori, int w, int h){
|
||||
double orig_hysto[0x10000] = {0.}; // original hystogram
|
||||
uint8_t eq_levls[0x10000] = {0}; // levels to convert: newpix = eq_levls[oldpix]
|
||||
int s = w*h;
|
||||
for(int i = 0; i < s; ++i) ++orig_hysto[ori[i]];
|
||||
#pragma omp parallel
|
||||
{
|
||||
//printf("%d\n", omp_get_thread_num());
|
||||
size_t histogram_private[0x10000] = {0};
|
||||
#pragma omp for nowait
|
||||
for(int i = 0; i < s; ++i){
|
||||
++histogram_private[ori[i]];
|
||||
}
|
||||
#pragma omp critical
|
||||
{
|
||||
for(int i = 0; i < 0x10000; ++i) orig_hysto[i] += histogram_private[i];
|
||||
}
|
||||
}
|
||||
double part = (double)(s + 1) / 0x100, N = 0.;
|
||||
for(int i = 0; i <= 0xffff; ++i){
|
||||
N += orig_hysto[i];
|
||||
eq_levls[i] = (uint8_t)(N/part);
|
||||
}
|
||||
|
||||
OMP_FOR()
|
||||
for(int i = 0; i < s; ++i){
|
||||
retn[i] = eq_levls[ori[i]];
|
||||
}
|
||||
@ -426,12 +457,21 @@ void change_displayed_image(windowData *win, IMG *img){
|
||||
DBG("imh=%d, imw=%d, ch=%u, cw=%u", im->h, im->w, img->w, img->h);
|
||||
pthread_mutex_lock(&win->mutex);
|
||||
int w = img->w, h = img->h, s = w*h;
|
||||
uint8_t *newima = equalize(img->data, w, h);
|
||||
GLubyte *dst = im->rawdata;
|
||||
for(int i = 0; i < s; ++i, dst += 3){
|
||||
gray2rgb(colorfun(newima[i] / 256.), dst);
|
||||
if(imequalize){
|
||||
uint8_t *newima = equalize(img->data, w, h);
|
||||
GLubyte *dst = im->rawdata;
|
||||
OMP_FOR()
|
||||
for(int i = 0; i < s; ++i){
|
||||
gray2rgb(colorfun(newima[i] / 256.), &dst[i*3]);
|
||||
}
|
||||
FREE(newima);
|
||||
}else{
|
||||
GLubyte *dst = im->rawdata;
|
||||
OMP_FOR()
|
||||
for(int i = 0; i < s; ++i){
|
||||
gray2rgb(colorfun(img->data[i] / 65536.), &dst[i*3]);
|
||||
}
|
||||
}
|
||||
FREE(newima);
|
||||
win->image->changed = 1;
|
||||
pthread_mutex_unlock(&win->mutex);
|
||||
}
|
||||
@ -457,7 +497,18 @@ void* image_thread(_U_ void *data){
|
||||
win->winevt &= ~WINEVT_ROLLCOLORFUN;
|
||||
change_displayed_image(win, img);
|
||||
}
|
||||
if(win->winevt & WINEVT_EQUALIZE){
|
||||
win->winevt &= ~WINEVT_EQUALIZE;
|
||||
imequalize = !imequalize;
|
||||
verbose(1, _("Equalization of histogram: %s"), imequalize ? N_("on") : N_("off"));
|
||||
}
|
||||
}
|
||||
usleep(10000);
|
||||
}
|
||||
}
|
||||
|
||||
void closeGL(){
|
||||
windowData *win = getWin();
|
||||
if(win) win->killthread = 1;
|
||||
while(getWin()) usleep(1000);
|
||||
}
|
||||
|
||||
@ -44,6 +44,8 @@ typedef struct{
|
||||
#define WINEVT_SAVEIMAGE (1<<2)
|
||||
// change color palette function
|
||||
#define WINEVT_ROLLCOLORFUN (1<<3)
|
||||
// invert equalization status
|
||||
#define WINEVT_EQUALIZE (1<<4)
|
||||
|
||||
// flip image
|
||||
#define WIN_FLIP_LR (1<<0)
|
||||
@ -73,6 +75,7 @@ typedef enum{
|
||||
} winIdType;
|
||||
|
||||
void imageview_init();
|
||||
void closeGL();
|
||||
windowData *createGLwin(char *title, int w, int h, rawimage *rawdata);
|
||||
windowData *getWin();
|
||||
int killwindow();
|
||||
|
||||
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-01-13 12:16+0300\n"
|
||||
"POT-Creation-Date: 2022-01-14 16:21+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -17,434 +17,457 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=koi8-r\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: cmdlnopts.c:68
|
||||
#: cmdlnopts.c:40
|
||||
msgid "camera device type (fli/zwo/etc)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:69
|
||||
#: cmdlnopts.c:41
|
||||
msgid "focuser device type (fli/zwo/etc)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:70
|
||||
#: cmdlnopts.c:42
|
||||
msgid "wheel device type (fli/zwo/etc)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:71
|
||||
#: cmdlnopts.c:43
|
||||
msgid "camera device number (if many: 0, 1, 2 etc)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:72
|
||||
#: cmdlnopts.c:44
|
||||
msgid "filter wheel device number (if many: 0, 1, 2 etc)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:73
|
||||
#: cmdlnopts.c:45
|
||||
msgid "focuser device number (if many: 0, 1, 2 etc)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:74
|
||||
#: cmdlnopts.c:46
|
||||
msgid "show this help"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:75
|
||||
#: cmdlnopts.c:47
|
||||
msgid "rewrite output file if exists"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:76
|
||||
#: cmdlnopts.c:48
|
||||
msgid "verbose level (each -v increase it)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:77
|
||||
#: cmdlnopts.c:49
|
||||
msgid "not open shutter, when exposing (\"dark frames\")"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:78
|
||||
#: cmdlnopts.c:50
|
||||
msgid "run in 8-bit mode"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:79
|
||||
#: cmdlnopts.c:51
|
||||
msgid "fast (8MHz) readout mode"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:80
|
||||
#: cmdlnopts.c:52
|
||||
msgid "set CCD temperature to given value (degr C)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:81
|
||||
#: cmdlnopts.c:53
|
||||
msgid "set fan speed (0 - off, 1 - low, 2 - high)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:83
|
||||
#: cmdlnopts.c:55
|
||||
msgid "program author"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:84
|
||||
#: cmdlnopts.c:56
|
||||
msgid "object type (neon, object, flat etc)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:85
|
||||
#: cmdlnopts.c:57
|
||||
msgid "instrument name"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:86
|
||||
#: cmdlnopts.c:58
|
||||
msgid "object name"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:87
|
||||
#: cmdlnopts.c:59
|
||||
msgid "observers' names"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:88
|
||||
#: cmdlnopts.c:60
|
||||
msgid "observing program name"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:89
|
||||
#: cmdlnopts.c:61
|
||||
msgid "add records to header from given file[s]"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:91
|
||||
#: cmdlnopts.c:63
|
||||
msgid "N flushes before exposing (default: 1)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:92
|
||||
#: cmdlnopts.c:64
|
||||
msgid "horizontal binning to N pixels"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:93
|
||||
#: cmdlnopts.c:65
|
||||
msgid "vertical binning to N pixels"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:94
|
||||
#: cmdlnopts.c:66
|
||||
msgid "make series of N frames"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:95
|
||||
#: cmdlnopts.c:67
|
||||
msgid "make pause for N seconds between expositions"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:96
|
||||
#: cmdlnopts.c:68
|
||||
msgid "set exposure time to given value (ms)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:97
|
||||
#: cmdlnopts.c:69
|
||||
msgid "frame X0 coordinate (-1 - all with overscan)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:98
|
||||
#: cmdlnopts.c:70
|
||||
msgid "frame Y0 coordinate (-1 - all with overscan)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:99
|
||||
#: cmdlnopts.c:71
|
||||
msgid "frame X1 coordinate (-1 - all with overscan)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:100
|
||||
#: cmdlnopts.c:72
|
||||
msgid "frame Y1 coordinate (-1 - all with overscan)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:101
|
||||
#: cmdlnopts.c:73
|
||||
msgid "grab full frame (with overscans)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:103
|
||||
#: cmdlnopts.c:75
|
||||
msgid "open shutter"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:104
|
||||
#: cmdlnopts.c:76
|
||||
msgid "close shutter"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:105
|
||||
#: cmdlnopts.c:77
|
||||
msgid "run exposition on LOW @ pin5 I/O port"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:106
|
||||
#: cmdlnopts.c:78
|
||||
msgid "run exposition on HIGH @ pin5 I/O port"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:107
|
||||
#: cmdlnopts.c:79
|
||||
msgid "get value of I/O port pins"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:108
|
||||
#: cmdlnopts.c:80
|
||||
msgid "move stepper motor asynchronous"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:110
|
||||
#: cmdlnopts.c:82
|
||||
msgid "set I/O port pins to given value (decimal number, pin1 is LSB)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:111
|
||||
#: cmdlnopts.c:83
|
||||
msgid ""
|
||||
"configure I/O port pins to given value (decimal number, pin1 is LSB, 1 == "
|
||||
"output, 0 == input)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:113
|
||||
#: cmdlnopts.c:85
|
||||
msgid "move focuser to absolute position, mm"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:114
|
||||
#: cmdlnopts.c:86
|
||||
msgid "move focuser to relative position, mm"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:116
|
||||
#: cmdlnopts.c:88
|
||||
msgid "set wheel position"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:119
|
||||
#: cmdlnopts.c:91
|
||||
msgid "Display image in OpenGL window"
|
||||
msgstr ""
|
||||
|
||||
#. Не могу сохранить файл
|
||||
#: ccdfunc.c:115
|
||||
#: ccdfunc.c:110
|
||||
msgid "Can't save file"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:257
|
||||
#: ccdfunc.c:252
|
||||
#, c-format
|
||||
msgid "File saved as '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:259
|
||||
#: ccdfunc.c:254
|
||||
msgid "Error saving file"
|
||||
msgstr ""
|
||||
|
||||
#. Статистика по изображению:\n
|
||||
#: ccdfunc.c:279
|
||||
#: ccdfunc.c:292
|
||||
#, c-format
|
||||
msgid "Image stat:\n"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:291
|
||||
#: ccdfunc.c:303
|
||||
msgid "Focuser device not pointed, try to guess"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:307
|
||||
#: ccdfunc.c:320
|
||||
msgid "Focuser not found"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:312
|
||||
#: ccdfunc.c:325
|
||||
#, c-format
|
||||
msgid "Found %d focusers, you point number %d"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:316
|
||||
#: ccdfunc.c:329
|
||||
msgid "Can't set active focuser number"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:330
|
||||
#: ccdfunc.c:343
|
||||
msgid "Can't get focuser limit positions"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:337
|
||||
#: ccdfunc.c:350
|
||||
msgid "Can't get current focuser position"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:351
|
||||
#: ccdfunc.c:364
|
||||
#, c-format
|
||||
msgid "Can't set position %g: out of limits [%g, %g]"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:355
|
||||
#: ccdfunc.c:368
|
||||
msgid "Can't home focuser"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:357
|
||||
#: ccdfunc.c:370
|
||||
#, c-format
|
||||
msgid "Can't set position %g"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:369
|
||||
#: ccdfunc.c:382
|
||||
msgid "Wheel device not pointed, try to guess"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:385
|
||||
#: ccdfunc.c:399
|
||||
msgid "Wheel not found"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:390
|
||||
#: ccdfunc.c:404
|
||||
#, c-format
|
||||
msgid "Found %d wheels, you point number %d"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:394
|
||||
#: ccdfunc.c:408
|
||||
msgid "Can't set active wheel number"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:406
|
||||
#: ccdfunc.c:424
|
||||
msgid "Can't get max wheel position"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:413
|
||||
#: ccdfunc.c:431
|
||||
#, c-format
|
||||
msgid "Wheel position should be from 0 to %d"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:417
|
||||
#: ccdfunc.c:435
|
||||
#, c-format
|
||||
msgid "Can't set wheel position %d"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:436
|
||||
#: ccdfunc.c:452
|
||||
#, c-format
|
||||
msgid "%.1f seconds till exposition ends"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:470
|
||||
msgid "Camera device not pointed, try to guess"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:452
|
||||
msgid "Camera device not found"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:457
|
||||
#, c-format
|
||||
msgid "Found %d cameras, you point number %d"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:461
|
||||
msgid "Can't set active camera number"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:467
|
||||
msgid "Can't set fan speed"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:472
|
||||
#, c-format
|
||||
msgid "Camera model: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:473
|
||||
#, c-format
|
||||
msgid "Pixel size: %g x %g"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:479
|
||||
#, c-format
|
||||
msgid "Full array: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:482
|
||||
#, c-format
|
||||
msgid "Field of view: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:485
|
||||
#, c-format
|
||||
msgid "Can't set T to %g degC"
|
||||
#: ccdfunc.c:487
|
||||
msgid "Camera not found"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:492
|
||||
#, c-format
|
||||
msgid "Found %d cameras, you point number %d"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:496
|
||||
msgid "Can't set active camera number"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:502
|
||||
msgid "Can't set fan speed"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:503
|
||||
#, c-format
|
||||
msgid "Set fan speed to %d"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:508
|
||||
#, c-format
|
||||
msgid "Camera model: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:509
|
||||
#, c-format
|
||||
msgid "Pixel size: %g x %g"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:515
|
||||
#, c-format
|
||||
msgid "Full array: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:518
|
||||
#, c-format
|
||||
msgid "Field of view: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:521
|
||||
#, c-format
|
||||
msgid "Can't set T to %g degC"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:528
|
||||
#, c-format
|
||||
msgid "Shutter command: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:494
|
||||
#: ccdfunc.c:530
|
||||
#, c-format
|
||||
msgid "Can't run shutter command %s (unsupported?)"
|
||||
msgstr ""
|
||||
|
||||
#. "Попытка сконфигурировать порт I/O как %d\n"
|
||||
#: ccdfunc.c:498
|
||||
#: ccdfunc.c:534
|
||||
#, c-format
|
||||
msgid "Try to convfigure I/O port as %d"
|
||||
msgid "Try to configure I/O port as %d"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:500
|
||||
#: ccdfunc.c:536
|
||||
msgid "Can't configure (unsupported?)"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:506
|
||||
#: ccdfunc.c:542
|
||||
msgid "Can't get IOport state (unsupported?)"
|
||||
msgstr ""
|
||||
|
||||
#. "Попытка записи %d в порт I/O\n"
|
||||
#: ccdfunc.c:510
|
||||
#: ccdfunc.c:546
|
||||
#, c-format
|
||||
msgid "Try to write %d to I/O port"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:512
|
||||
#: ccdfunc.c:548
|
||||
msgid "Can't set IOport"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:524
|
||||
#: ccdfunc.c:556
|
||||
#, c-format
|
||||
msgid "Can't set binning %dx%d"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:526
|
||||
#: ccdfunc.c:558
|
||||
msgid "Can't get current binning"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:541
|
||||
#: ccdfunc.c:573
|
||||
msgid "Can't set given geometry"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:544
|
||||
#: ccdfunc.c:576
|
||||
#, c-format
|
||||
msgid "Can't set %d flushes"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:547
|
||||
#: ccdfunc.c:579
|
||||
#, c-format
|
||||
msgid "Can't set exposure time to %f seconds"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:550
|
||||
#: ccdfunc.c:582
|
||||
msgid "Can't change frame type"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:553
|
||||
#: ccdfunc.c:585
|
||||
msgid "Can't set bit depth"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:556
|
||||
#: ccdfunc.c:588
|
||||
msgid "Can't set readout speed"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:557
|
||||
msgid "Fast readout mode"
|
||||
#: ccdfunc.c:589
|
||||
#, c-format
|
||||
msgid "Readout mode: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:558
|
||||
#: ccdfunc.c:590
|
||||
msgid "Only show statistics"
|
||||
msgstr ""
|
||||
|
||||
#. Захват кадра %d\n
|
||||
#: ccdfunc.c:565
|
||||
#, c-format
|
||||
msgid "Capture frame %d\n"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:570
|
||||
#, c-format
|
||||
msgid "%.1f seconds till exposition ends"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:578
|
||||
msgid "Can't capture image"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:581
|
||||
msgid "Read grabbed image"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:583 ccdfunc.c:606 ccdfunc.c:637
|
||||
msgid "Can't grab image"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:594
|
||||
#: ccdfunc.c:601
|
||||
msgid "Can't open OpenGL window, image preview will be inaccessible"
|
||||
msgstr ""
|
||||
|
||||
#. Захват кадра %d\n
|
||||
#: ccdfunc.c:608
|
||||
#, c-format
|
||||
msgid "Capture frame %d"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:611 ccdfunc.c:633 ccdfunc.c:674
|
||||
msgid "Can't capture image"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:614
|
||||
msgid "Read grabbed image"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:617 ccdfunc.c:637 ccdfunc.c:678
|
||||
msgid "Can't grab image"
|
||||
msgstr ""
|
||||
|
||||
#. %d секунд до окончания паузы\n
|
||||
#: ccdfunc.c:619
|
||||
#: ccdfunc.c:654
|
||||
#, c-format
|
||||
msgid "%d seconds till pause ends\n"
|
||||
msgstr ""
|
||||
|
||||
#: imageview.c:257
|
||||
#: imageview.c:264
|
||||
msgid "Can't init mutex!"
|
||||
msgstr ""
|
||||
|
||||
#: imageview.c:275
|
||||
#: imageview.c:282
|
||||
msgid "Already initialized!"
|
||||
msgstr ""
|
||||
|
||||
#: imageview.c:408
|
||||
#, c-format
|
||||
msgid "Histogram conversion: %s"
|
||||
msgstr ""
|
||||
|
||||
#: imageview.c:503
|
||||
#, c-format
|
||||
msgid "Equalization of histogram: %s"
|
||||
msgstr ""
|
||||
|
||||
#: imageview.c:503
|
||||
msgid "on"
|
||||
msgstr ""
|
||||
|
||||
#: imageview.c:503
|
||||
msgid "off"
|
||||
msgstr ""
|
||||
|
||||
245
locale/ru/ru.po
245
locale/ru/ru.po
@ -7,7 +7,7 @@
|
||||
msgid ""
|
||||
msgstr "Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-01-13 12:15+0300\n"
|
||||
"POT-Creation-Date: 2022-01-14 16:21+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -16,433 +16,456 @@ msgstr "Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Content-Type: text/plain; charset=koi8-r\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ccdfunc.c:570
|
||||
#: ccdfunc.c:452
|
||||
#, c-format
|
||||
msgid "%.1f seconds till exposition ends"
|
||||
msgstr ""
|
||||
|
||||
#. %d секунд до окончания паузы\n
|
||||
#: ccdfunc.c:619
|
||||
#: ccdfunc.c:654
|
||||
#, c-format
|
||||
msgid "%d seconds till pause ends\n"
|
||||
msgstr ""
|
||||
|
||||
#: imageview.c:275
|
||||
#: imageview.c:282
|
||||
msgid "Already initialized!"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:452
|
||||
msgid "Camera device not found"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:436
|
||||
#: ccdfunc.c:470
|
||||
msgid "Camera device not pointed, try to guess"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:472
|
||||
#: ccdfunc.c:508
|
||||
#, c-format
|
||||
msgid "Camera model: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:578
|
||||
#: ccdfunc.c:487
|
||||
msgid "Camera not found"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:611 ccdfunc.c:633 ccdfunc.c:674
|
||||
msgid "Can't capture image"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:550
|
||||
#: ccdfunc.c:582
|
||||
msgid "Can't change frame type"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:500
|
||||
#: ccdfunc.c:536
|
||||
msgid "Can't configure (unsupported?)"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:506
|
||||
#: ccdfunc.c:542
|
||||
msgid "Can't get IOport state (unsupported?)"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:526
|
||||
#: ccdfunc.c:558
|
||||
msgid "Can't get current binning"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:337
|
||||
#: ccdfunc.c:350
|
||||
msgid "Can't get current focuser position"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:330
|
||||
#: ccdfunc.c:343
|
||||
msgid "Can't get focuser limit positions"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:406
|
||||
#: ccdfunc.c:424
|
||||
msgid "Can't get max wheel position"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:583 ccdfunc.c:606 ccdfunc.c:637
|
||||
#: ccdfunc.c:617 ccdfunc.c:637 ccdfunc.c:678
|
||||
msgid "Can't grab image"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:355
|
||||
#: ccdfunc.c:368
|
||||
msgid "Can't home focuser"
|
||||
msgstr ""
|
||||
|
||||
#: imageview.c:257
|
||||
#: imageview.c:264
|
||||
msgid "Can't init mutex!"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:594
|
||||
#: ccdfunc.c:601
|
||||
msgid "Can't open OpenGL window, image preview will be inaccessible"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:494
|
||||
#: ccdfunc.c:530
|
||||
#, c-format
|
||||
msgid "Can't run shutter command %s (unsupported?)"
|
||||
msgstr ""
|
||||
|
||||
#. Не могу сохранить файл
|
||||
#: ccdfunc.c:115
|
||||
#: ccdfunc.c:110
|
||||
msgid "Can't save file"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:544
|
||||
#: ccdfunc.c:576
|
||||
#, c-format
|
||||
msgid "Can't set %d flushes"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:512
|
||||
#: ccdfunc.c:548
|
||||
msgid "Can't set IOport"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:485
|
||||
#: ccdfunc.c:521
|
||||
#, c-format
|
||||
msgid "Can't set T to %g degC"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:461
|
||||
#: ccdfunc.c:496
|
||||
msgid "Can't set active camera number"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:316
|
||||
#: ccdfunc.c:329
|
||||
msgid "Can't set active focuser number"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:394
|
||||
#: ccdfunc.c:408
|
||||
msgid "Can't set active wheel number"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:524
|
||||
#: ccdfunc.c:556
|
||||
#, c-format
|
||||
msgid "Can't set binning %dx%d"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:553
|
||||
#: ccdfunc.c:585
|
||||
msgid "Can't set bit depth"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:547
|
||||
#: ccdfunc.c:579
|
||||
#, c-format
|
||||
msgid "Can't set exposure time to %f seconds"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:467
|
||||
#: ccdfunc.c:502
|
||||
msgid "Can't set fan speed"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:541
|
||||
#: ccdfunc.c:573
|
||||
msgid "Can't set given geometry"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:357
|
||||
#: ccdfunc.c:370
|
||||
#, c-format
|
||||
msgid "Can't set position %g"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:351
|
||||
#: ccdfunc.c:364
|
||||
#, c-format
|
||||
msgid "Can't set position %g: out of limits [%g, %g]"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:556
|
||||
#: ccdfunc.c:588
|
||||
msgid "Can't set readout speed"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:417
|
||||
#: ccdfunc.c:435
|
||||
#, c-format
|
||||
msgid "Can't set wheel position %d"
|
||||
msgstr ""
|
||||
|
||||
#. Захват кадра %d\n
|
||||
#: ccdfunc.c:565
|
||||
#: ccdfunc.c:608
|
||||
#, c-format
|
||||
msgid "Capture frame %d\n"
|
||||
msgid "Capture frame %d"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:119
|
||||
#: cmdlnopts.c:91
|
||||
msgid "Display image in OpenGL window"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:259
|
||||
#: imageview.c:503
|
||||
#, c-format
|
||||
msgid "Equalization of histogram: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:254
|
||||
msgid "Error saving file"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:557
|
||||
msgid "Fast readout mode"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:482
|
||||
#: ccdfunc.c:518
|
||||
#, c-format
|
||||
msgid "Field of view: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:257
|
||||
#: ccdfunc.c:252
|
||||
#, c-format
|
||||
msgid "File saved as '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:291
|
||||
#: ccdfunc.c:303
|
||||
msgid "Focuser device not pointed, try to guess"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:307
|
||||
#: ccdfunc.c:320
|
||||
msgid "Focuser not found"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:457
|
||||
#: ccdfunc.c:492
|
||||
#, c-format
|
||||
msgid "Found %d cameras, you point number %d"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:312
|
||||
#: ccdfunc.c:325
|
||||
#, c-format
|
||||
msgid "Found %d focusers, you point number %d"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:390
|
||||
#: ccdfunc.c:404
|
||||
#, c-format
|
||||
msgid "Found %d wheels, you point number %d"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:479
|
||||
#: ccdfunc.c:515
|
||||
#, c-format
|
||||
msgid "Full array: %s"
|
||||
msgstr ""
|
||||
|
||||
#. Статистика по изображению:\n
|
||||
#: ccdfunc.c:279
|
||||
#: imageview.c:408
|
||||
#, c-format
|
||||
msgid "Histogram conversion: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:292
|
||||
#, c-format
|
||||
msgid "Image stat:\n"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:91
|
||||
#: cmdlnopts.c:63
|
||||
msgid "N flushes before exposing (default: 1)"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:558
|
||||
#: ccdfunc.c:590
|
||||
msgid "Only show statistics"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:473
|
||||
#: ccdfunc.c:509
|
||||
#, c-format
|
||||
msgid "Pixel size: %g x %g"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:581
|
||||
#: ccdfunc.c:614
|
||||
msgid "Read grabbed image"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:492
|
||||
#: ccdfunc.c:589
|
||||
#, c-format
|
||||
msgid "Readout mode: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:503
|
||||
#, c-format
|
||||
msgid "Set fan speed to %d"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:528
|
||||
#, c-format
|
||||
msgid "Shutter command: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#. "Попытка сконфигурировать порт I/O как %d\n"
|
||||
#: ccdfunc.c:498
|
||||
#: ccdfunc.c:534
|
||||
#, c-format
|
||||
msgid "Try to convfigure I/O port as %d"
|
||||
msgid "Try to configure I/O port as %d"
|
||||
msgstr ""
|
||||
|
||||
#. "Попытка записи %d в порт I/O\n"
|
||||
#: ccdfunc.c:510
|
||||
#: ccdfunc.c:546
|
||||
#, c-format
|
||||
msgid "Try to write %d to I/O port"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:369
|
||||
#: ccdfunc.c:382
|
||||
msgid "Wheel device not pointed, try to guess"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:385
|
||||
#: ccdfunc.c:399
|
||||
msgid "Wheel not found"
|
||||
msgstr ""
|
||||
|
||||
#: ccdfunc.c:413
|
||||
#: ccdfunc.c:431
|
||||
#, c-format
|
||||
msgid "Wheel position should be from 0 to %d"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:89
|
||||
#: cmdlnopts.c:61
|
||||
msgid "add records to header from given file[s]"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:71
|
||||
#: cmdlnopts.c:43
|
||||
msgid "camera device number (if many: 0, 1, 2 etc)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:68
|
||||
#: cmdlnopts.c:40
|
||||
msgid "camera device type (fli/zwo/etc)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:104
|
||||
#: cmdlnopts.c:76
|
||||
msgid "close shutter"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:111
|
||||
#: cmdlnopts.c:83
|
||||
msgid "configure I/O port pins to given value (decimal number, pin1 is LSB, "
|
||||
"1 == output, 0 == input)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:79
|
||||
#: cmdlnopts.c:51
|
||||
msgid "fast (8MHz) readout mode"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:72
|
||||
#: cmdlnopts.c:44
|
||||
msgid "filter wheel device number (if many: 0, 1, 2 etc)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:73
|
||||
#: cmdlnopts.c:45
|
||||
msgid "focuser device number (if many: 0, 1, 2 etc)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:69
|
||||
#: cmdlnopts.c:41
|
||||
msgid "focuser device type (fli/zwo/etc)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:97
|
||||
#: cmdlnopts.c:69
|
||||
msgid "frame X0 coordinate (-1 - all with overscan)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:99
|
||||
#: cmdlnopts.c:71
|
||||
msgid "frame X1 coordinate (-1 - all with overscan)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:98
|
||||
#: cmdlnopts.c:70
|
||||
msgid "frame Y0 coordinate (-1 - all with overscan)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:100
|
||||
#: cmdlnopts.c:72
|
||||
msgid "frame Y1 coordinate (-1 - all with overscan)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:107
|
||||
#: cmdlnopts.c:79
|
||||
msgid "get value of I/O port pins"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:101
|
||||
#: cmdlnopts.c:73
|
||||
msgid "grab full frame (with overscans)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:92
|
||||
#: cmdlnopts.c:64
|
||||
msgid "horizontal binning to N pixels"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:85
|
||||
#: cmdlnopts.c:57
|
||||
msgid "instrument name"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:95
|
||||
#: cmdlnopts.c:67
|
||||
msgid "make pause for N seconds between expositions"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:94
|
||||
#: cmdlnopts.c:66
|
||||
msgid "make series of N frames"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:113
|
||||
#: cmdlnopts.c:85
|
||||
msgid "move focuser to absolute position, mm"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:114
|
||||
#: cmdlnopts.c:86
|
||||
msgid "move focuser to relative position, mm"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:108
|
||||
#: cmdlnopts.c:80
|
||||
msgid "move stepper motor asynchronous"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:77
|
||||
#: cmdlnopts.c:49
|
||||
msgid "not open shutter, when exposing (\"dark frames\")"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:86
|
||||
#: cmdlnopts.c:58
|
||||
msgid "object name"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:84
|
||||
#: cmdlnopts.c:56
|
||||
msgid "object type (neon, object, flat etc)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:87
|
||||
#: cmdlnopts.c:59
|
||||
msgid "observers' names"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:88
|
||||
#: cmdlnopts.c:60
|
||||
msgid "observing program name"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:103
|
||||
msgid "open shutter"
|
||||
#: imageview.c:503
|
||||
msgid "off"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:83
|
||||
msgid "program author"
|
||||
#: imageview.c:503
|
||||
msgid "on"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:75
|
||||
msgid "open shutter"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:55
|
||||
msgid "program author"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:47
|
||||
msgid "rewrite output file if exists"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:106
|
||||
#: cmdlnopts.c:78
|
||||
msgid "run exposition on HIGH @ pin5 I/O port"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:105
|
||||
#: cmdlnopts.c:77
|
||||
msgid "run exposition on LOW @ pin5 I/O port"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:78
|
||||
#: cmdlnopts.c:50
|
||||
msgid "run in 8-bit mode"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:80
|
||||
#: cmdlnopts.c:52
|
||||
msgid "set CCD temperature to given value (degr C)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:110
|
||||
#: cmdlnopts.c:82
|
||||
msgid "set I/O port pins to given value (decimal number, pin1 is LSB)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:96
|
||||
#: cmdlnopts.c:68
|
||||
msgid "set exposure time to given value (ms)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:81
|
||||
#: cmdlnopts.c:53
|
||||
msgid "set fan speed (0 - off, 1 - low, 2 - high)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:116
|
||||
#: cmdlnopts.c:88
|
||||
msgid "set wheel position"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:74
|
||||
#: cmdlnopts.c:46
|
||||
msgid "show this help"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:76
|
||||
#: cmdlnopts.c:48
|
||||
msgid "verbose level (each -v increase it)"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:93
|
||||
#: cmdlnopts.c:65
|
||||
msgid "vertical binning to N pixels"
|
||||
msgstr ""
|
||||
|
||||
#: cmdlnopts.c:70
|
||||
#: cmdlnopts.c:42
|
||||
msgid "wheel device type (fli/zwo/etc)"
|
||||
msgstr ""
|
||||
|
||||
17
main.c
17
main.c
@ -15,7 +15,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <omp.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@ -30,16 +30,27 @@
|
||||
#ifdef IMAGEVIEW
|
||||
#include "imageview.h"
|
||||
#endif
|
||||
#include "omp.h"
|
||||
|
||||
void signals(int signo){
|
||||
WARNX("Get signal %d - exit", signo);
|
||||
DBG("Cancel capturing");
|
||||
cancel();
|
||||
#ifdef IMAGEVIEW
|
||||
DBG("KILL GL");
|
||||
closeGL();
|
||||
usleep(100000);
|
||||
#endif
|
||||
exit(signo);
|
||||
}
|
||||
|
||||
extern const char *__progname;
|
||||
|
||||
int main(int argc, char **argv){
|
||||
initial_setup();
|
||||
/*
|
||||
int cpunumber = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
if(omp_get_max_threads() != cpunumber)
|
||||
omp_set_num_threads(cpunumber);
|
||||
*/
|
||||
parse_args(argc, argv);
|
||||
signal(SIGINT, signals);
|
||||
signal(SIGQUIT, signals);
|
||||
|
||||
37
omp.h
Normal file
37
omp.h
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* This file is part of the CCD_Capture project.
|
||||
* Copyright 2022 Edward V. Emelianov <edward.emelianoff@gmail.com>.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef OMP_H__
|
||||
#define OMP_H__
|
||||
|
||||
#ifdef OMP_FOUND
|
||||
#include <omp.h>
|
||||
|
||||
#ifndef OMP_FOR
|
||||
#define Stringify(x) #x
|
||||
#define OMP_FOR(x) _Pragma(Stringify(omp parallel for x))
|
||||
|
||||
#endif
|
||||
#else
|
||||
|
||||
#define OMP_FOR(x)
|
||||
|
||||
#endif
|
||||
|
||||
#endif // OMP_H__
|
||||
Loading…
x
Reference in New Issue
Block a user