Hello, I would like to know if it is possible to add a function to write the temperature from the dslr sensor of the camera to the name of the fit file? How for example is this done in APT on Windows?
The temperature is logged in the EXIF metadata, but is generally not shown by photo editing software. It would have to be read and added to the file name.
Currently I know of only a couple tools to access that information:
ExifTool
by Phil Harvey, a command line application for Windows, with a GUI made separately for it. And,
EXIFlog
which I have not used yet, but is evidently based on ExifTool.
as Jasem said, it is already implemented in gphoto2 driver.
During build process it is checked whether the used libraw library supports the functionality
CHECK_STRUCT_HAS_MEMBER("libraw_imgother_t" CameraTemperature "libraw/libraw_types.h" HAVE_LIBRAW_CAMERA_TEMPERATURE LANGUAGE C)
if (HAVE_LIBRAW_CAMERA_TEMPERATURE)
set(LIBRAW_CAMERA_TEMPERATURE 1)
message(STATUS "Found CameraTemperature in 'libraw/libraw_types.h'")
endif ()
CHECK_STRUCT_HAS_MEMBER("libraw_imgother_t" SensorTemperature "libraw/libraw_types.h" HAVE_LIBRAW_SENSOR_TEMPERATURE LANGUAGE C)
if (HAVE_LIBRAW_SENSOR_TEMPERATURE)
set(LIBRAW_SENSOR_TEMPERATURE 1)
message(STATUS "Found SensorTemperature in 'libraw/libraw_types.h'")
endif ()
If libraw supports this functionality and the temperature information is also available and embedded in the DSLR RAW file, then it is read out
if (lib_raw.imgdata.other.SensorTemperature > -273.15f)
gphoto->last_sensor_temp = lib_raw.imgdata.other.SensorTemperature;
else if (lib_raw.imgdata.other.CameraTemperature > -273.15f)
gphoto->last_sensor_temp = lib_raw.imgdata.other.CameraTemperature;
and provided in the INDI framework, for e.g. save it as a FIT keyword.
if (isTemperatureSupported){
double cameraTemperature = static_cast<double>(gphoto_get_last_sensor_temperature(gphotodrv));
if (fabs(cameraTemperature - TemperatureN[0].value) > 0.01){
// Check if we are getting bogus temperature values and set property to alert
// unless it is already set
if (cameraTemperature < MINUMUM_CAMERA_TEMPERATURE){
if (TemperatureNP.s != IPS_ALERT){
TemperatureNP.s = IPS_ALERT;
IDSetNumber(&TemperatureNP, nullptr);
}}
else
{
TemperatureNP.s = IPS_OK;
TemperatureN[0].value = cameraTemperature;
IDSetNumber(&TemperatureNP, nullptr);
}}}
I come from Backyard OES where I found that feature really useful. I could not find this feature in Ekos and thought that was because I was saving as FIT files and not using the native RAW format of my Canon 1000D (CR2 files)
In BYOE I got files named like this : Light_0012_ISO800_300s__18C_M57.CR2 where "18C" is the temperature in Celsius.
I would love to see this implemented in Ekos
"Some people are so poor, all they have is money"
SW Black Diamond 80ED | SW150MAK | Newton SW 200/1000 | Orion 50mm Guider with Helical Focuser |Sirius EQ-G Rowan Belt Mode
Canon 1000D moded | ZWO ASI185MC | Baader Mark III Zoom
INDI | Stellarmate on RPI3B+ | Stellarium | Pixinsight
I'm new to Ekos, using astroberry, rpi4, Canon 700D.
Does the code snippet you posted mean that I need to recompile Ekos, maybe with a different libraw?
In my Ekos fits files there is no sensor temp recorded in the header, as far as I can see. I can have Ekos save raw files, but then I lose seeing each image in the fits viewer, which is a really nice sanity check that things out at the scope are working correctly. While adding the sensor temp to each filename would be the best, without the ability to even recover the temperature reported by the sensor I am left to just guess which master dark to use based on ambient temperature (and I do not have ambient temps recorded for my darks library)
As another possible fallback, is there an Ekos option to have the raw files saved on the camera SD card in addition to the fits file saved on the pi?
Hi, how to use this script to print ccd temp on file name?
The temperature is correctly saved on the fits file, but for fast elaboration i need to see temperature in file name
Tanks