flir_stats: Statistics from 'get_stats' for photo FLIR8565.jpg

Description Usage Format Details Examples

Description

Results of running get_stats for photo FLIR8565.jpg. The image file is included in the package installation and can be located by: system.file("extdata/FLIR8565.jpg", package = "ThermStats").

Usage

1

Format

A list consisting of:

Details

This data is primarily included to speed up build time of the package vignette (see browseVignettes("ThermStats")). If interested, you can reproduce flir_stats following the example below.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
head(flir_stats$df)
flir_stats$pstats
plot_patches(df = flir_stats$df,
             patches = flir_stats$patches, 
             save_plot = FALSE, 
             print_plot = TRUE)
             
# Recreate flir_stats ------------------------------------------------------

# Define raw data
raw_dat <- flir_raw$raw_dat$`8565`
# Define camera calibration constants dataframe
camera_params <- flir_raw$camera_params
# Define metadata
metadata <- flir_metadata
# Create vector denoting the position of photo within metadata
photo_index <- match(8565, metadata$photo_no)
# Convert
flir_converted <- 
    Thermimage::raw2temp(
        raw = raw_dat,
        # Emissivity = mean of range in Scheffers et al. 2017
        E = mean(c(0.982,0.99)),
        # Object distance = hypotenuse of right triangle where 
        # vertical side is 1.3 m (breast height) & angle down is 45°
        OD = (sqrt(2))*1.3,
        # Apparent reflected temperature & atmospheric temperature =
        # atmospheric temperature measured in the field
        RTemp = metadata$atm_temp[photo_index],
        ATemp = metadata$atm_temp[photo_index],
        # Relative humidity = relative humidity measured in the field
        RH = metadata$rel_humidity[photo_index],
        # Calibration constants from 'batch_extract'
        PR1 = camera_params[,"PlanckR1"],
        PB = camera_params[,"PlanckB"],
        PF = camera_params[,"PlanckF"],
        PO = camera_params[,"PlanckO"],
        PR2 = camera_params[,"PlanckR2"])
        
# Get stats
flir_stats <-
    get_stats(
        # The temperature dataset
        img = flir_converted,
        # The ID of the dataset
        id = "8565",
        # Whether or not to calculate thermal connectivity
        calc_connectivity = FALSE,
        # Whether or not to identify hot and cold spots
        patches = TRUE,
        # The image projection (only relevant for geographic data)
        img_proj = NULL,
        # The image extent (only relevant for geographic data)
        img_extent = NULL, 
        # The data to return
        return_vals = c("df", # Temperature data as dataframe
                        "patches", # Patch outlines
                        "pstats"), # Patch statistics dataframe
        # The summary statistics of interest
        sum_stats = c("median", "SHDI", "perc_5", "perc_95"))

rasenior/PatchStatsFLIR documentation built on Oct. 28, 2020, 11:53 p.m.