Skip to content

Instantly share code, notes, and snippets.

David LeBauer dlebauer

Block or report user

Report or block dlebauer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View studies_inserts.sql
insert into attributes (container_type, container_id, value) VALUES ('experiments', 6000000012, '{"brapi":{"trialDbId":"6"}}');
insert into attributes (container_type, container_id, value) VALUES ('experiments', 6000000001, '{"brapi":{"trialDbId":"1"}}');
insert into attributes (container_type, container_id, value) VALUES ('experiments', 6000000002, '{"brapi":{"trialDbId":"3"}}');
insert into attributes (container_type, container_id, value) VALUES ('experiments', 6000000003, '{"brapi":{"trialDbId":"6"}}');
insert into attributes (container_type, container_id, value) VALUES ('experiments', 6000000004, '{"brapi":{"trialDbId":"6"}}');
insert into attributes (container_type, container_id, value) VALUES ('experiments', 6000000005, '{"brapi":{"trialDbId":"6"}}');
insert into attributes (container_type, container_id, value) VALUES ('experiments', 6000000006, '{"brapi":{"trialDbId":"6"}}');
insert into attributes (container_type, container_id, value) VALUES ('experiments', 6000000007, '{"brapi":{"trialDbId":"6
View biocro.Rscript
#!/usr/bin/env Rscript
if(!file.exists('biocro_helpers.R')){
download.file('https://gist.githubusercontent.com/dlebauer/8010fc210ea6552b8f6df66f22d00c6c/raw/e99240b0607bf8c88eb053a40a2906aec46e06f1/biocro_helpers.R',
destfile = 'biocro_helpers.R')
}
source('biocro_helpers.R')
View observationunit.json
"result": {
"data": [
{
"germplasmDbId": "6000000862",
"germplasmName": "RIL-CS3_(TX2910/(Macia/R07007)-CS44)-CSF1-PRF2-CS3",
"observationLevel": "plot",
"observationUnitDbId": "6000000002",
"observationUnitName": "MAC Field Scanner Season 1 Field Plot 861",
"observations": [
{
View hyperspectral_level1.json
{
"dimensions": {
"wavelength": 955,
"wvl_nvr": 1024,
"x": 1600,
"y": 468
},
"flx_dwn": {
"dims": ["wavelength"],
"type": "float",
@dlebauer
dlebauer / vnir_netcdf_L1_ua-mac_2017-10-23__09-50-13-395_ind.nc
Created Feb 15, 2019
Dump of TERRA REF hyperspectral indices file
View vnir_netcdf_L1_ua-mac_2017-10-23__09-50-13-395_ind.nc
netcdf vnir_netcdf_L1_ua-mac_2017-10-23__09-50-13-395_ind {
dimensions:
x = 1600 ;
y = 2089 ;
wavelength = 955 ;
variables:
double x(x) ;
x:algorithm = "Based on https://github.com/terraref/computing-pipeline/issues/144, x is derived from camera geometry including the Aperature Field-of-View (AFOV), the Horizontal Field-of-View (HFOV), and the height of the camera above the canopy(aka the Working Distance, or WD). We take WD = 2 m. Focal length (about 25 mm) is ignored in this estimate because it is much smaller than the WD. The camera geometry implies that AFOV[degrees]=2*atan(HFOV/WD). We use AFOV=21 and 44.6 degress for SWIR and VNIR, respectively. Then we solve for HFOV, and that distance is equally apportioned to 384 or 1600 pixels for SWIR or VNIR, respectively. For SWIR x = 1.93mm, for VNIR x = 1.025mm." ;
x:long_name = "North distance from southeast corner of field" ;
x:orientation = "The x-dimension (which runs north-south) spans what are called samples or pixels. The y-dimension (which run
@dlebauer
dlebauer / docker-compose.override.yml
Created Feb 11, 2019
set postgres ports for github.com:pecanproject/bety
View docker-compose.override.yml
version: "3"
services:
postgres:
ports:
- 5432:5432
@dlebauer
dlebauer / all_s4_6_traits.sql
Last active Feb 7, 2019
two approaches to retrieving canopy height + canopy cover data
View all_s4_6_traits.sql
\copy (select raw_date, sitename, cultivar, trait, method, mean
from traits_and_yields_view_private
sitename like '%Season 4%' and sitename ~ 'Range (20|30)$')
to ~/season4traits.csv delimiter ',' csv header;
\copy (select raw_date, sitename, cultivar, trait, method, mean
from traits_and_yields_view_private
sitename like '%Season 6%' and sitename ~ 'Range (20|30)$')
to ~/season6traits.csv delimiter ',' csv header;
View trait_count.md
trait n
surface_temperature 598409
canopy_cover 451470
canopy_height 259237
seedling_vigor 6246
stem_elongated_internodes_number 4982
emergence_score 4556
leaf_desiccation_present 4200
emergence_count 4166
@dlebauer
dlebauer / docker-compose.override.yml
Last active Dec 14, 2018 — forked from robkooper/docker-compose.override.yml
PEcAn docker override . docker-compose -p pecan -f docker-compose.override.yml up
View docker-compose.override.yml
version: "3"
services:
# mount PEcAn web folder into web server, this allows for
# editing code in PHP and immediatly test the new code.
web:
volumes:
- ${HOME}/git/pecan/web:/var/www/html/pecan
- ${HOME}/git/pecan/docker/config.docker.php:/var/www/html/pecan/config.php
@dlebauer
dlebauer / sorghum-lines-genomics.md
Last active May 1, 2018
Genomics - Sorghum Lines
View sorghum-lines-genomics.md
You can’t perform that action at this time.