×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Writing dslr temperature

  • Posts: 25
  • Thank you received: 0
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?
4 years 2 months ago #48079

Please Log in or Create an account to join the conversation.

  • Posts: 1309
  • Thank you received: 226

Replied by Andrew on topic Writing dslr temperature

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.
The following user(s) said Thank You: Paul
Last edit: 4 years 2 months ago by Andrew.
4 years 2 months ago #48086

Please Log in or Create an account to join the conversation.

It's already implemented in the INDI driver. Maybe it only works for some cameras?
4 years 2 months ago #48098

Please Log in or Create an account to join the conversation.

  • Posts: 25
  • Thank you received: 0

Replied by Paul on topic Writing dslr temperature

Hello! I did not notice such an opportunity. I have a Canon 1100d.
4 years 2 months ago #48101

Please Log in or Create an account to join the conversation.

  • Posts: 111
  • Thank you received: 40
Hi there,

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);
                        }
                    }
                }
The following user(s) said Thank You: Paul
4 years 2 months ago #48107

Please Log in or Create an account to join the conversation.

  • Posts: 83
  • Thank you received: 6
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
4 years 2 months ago #48119

Please Log in or Create an account to join the conversation.

  • Posts: 211
  • Thank you received: 31

Replied by Ron DeBry on topic Writing dslr temperature

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?
3 years 3 months ago #64244

Please Log in or Create an account to join the conversation.

  • Posts: 18
  • Thank you received: 0

Replied by Andrea on topic Writing dslr temperature

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
3 years 3 months ago #64327

Please Log in or Create an account to join the conversation.

Time to create page: 0.763 seconds