function [data, auxData, metaData, txtData, weights] = mydata_Upupa_epops

%% set metaData
metaData.phylum     = 'Chordata'; 
metaData.class      = 'Aves'; 
metaData.order      = 'Bucerotiformes'; 
metaData.family     = 'Upupidae';
metaData.species    = 'Upupa_epops'; 
metaData.species_en = 'Eurasian hoopoe'; 

metaData.ecoCode.climate = {'B', 'C', 'D'};
metaData.ecoCode.ecozone = {'THp'};
metaData.ecoCode.habitat = {'0iTi', '0iTh'};
metaData.ecoCode.embryo  = {'Tnwf'};
metaData.ecoCode.migrate = {};
metaData.ecoCode.food    = {'biCi', 'biCvr'};
metaData.ecoCode.gender  = {'Dg'};
metaData.ecoCode.reprod  = {'O'};

metaData.T_typical  = C2K(40); % K, body temp
metaData.data_0     = {'ab'; 'ax'; 'ap'; 'aR'; 'am'; 'Wwb'; 'Wwi'; 'Ri'}; 
metaData.data_1     = {'t-Ww'}; 

metaData.COMPLETE = 2.5; % using criteria of LikaKear2011

metaData.author   = {'Bas Kooijman'};    
metaData.date_subm = [2018 10 04];              
metaData.email    = {'bas.kooijman@vu.nl'};            
metaData.address  = {'VU University Amsterdam'};   

metaData.author_mod_1   = {'Bas Kooijman', 'Starrlight Augustine'};    
metaData.date_mod_1     = [2023 07 04];              
metaData.email_mod_1    = {'bas.kooijman@vu.nl'};            
metaData.address_mod_1  = {'VU University, Amsterdam'};   

metaData.curator     = {'Starrlight Augustine'};
metaData.email_cur   = {'starrlight@tecnico.ulisboa.pt'}; 
metaData.date_acc    = [2023 07 04];

%% set data
% zero-variate data

data.ab = 16.5;        units.ab = 'd';    label.ab = 'age at birth';                 bibkey.ab = 'Wiki';   
  temp.ab = C2K(36); units.temp.ab = 'K'; label.temp.ab = 'temperature';
  comment.ab = '15 to 18 d';
data.tx = 27.5;        units.tx = 'd';    label.tx = 'time since birth at fledging'; bibkey.tx = 'Wiki';   
  temp.tx = C2K(40); units.temp.tx = 'K'; label.temp.tx = 'temperature';
  comment.tx = '26 to 29 d';
data.tp = 82.5;        units.tp = 'd';    label.tp = 'time since birth at puberty'; bibkey.tp = 'guess';   
  temp.tp = C2K(40); units.temp.tp = 'K'; label.temp.tp = 'temperature';
  comment.tp = '26 to 29 d';
data.tR = 365;       units.tR = 'd';    label.tR = 'time since birth at 1st brood';bibkey.tR = 'AnAge';
  temp.tR = C2K(40); units.temp.tR = 'K'; label.temp.tR = 'temperature';
data.am = 11.1*365;    units.am = 'd';    label.am = 'life span';                    bibkey.am = 'AnAge';   
  temp.am = C2K(40); units.temp.am = 'K'; label.temp.am = 'temperature'; 

data.Wwb = 4;     units.Wwb = 'g';   label.Wwb = 'wet weight at birth';         bibkey.Wwb = 'Wiki';
  comment.Wwb = 'Wiki: egg weight 4.5 g';
data.Wwi = 75;    units.Wwi = 'g';   label.Wwi = 'ultimate wet weight for females'; bibkey.Wwi = 'Wiki';
  comment.Wwi = 'Wiki: 46 to 89 g';

data.Ri  = 12/365;    units.Ri  = '#/d'; label.Ri  = 'maximum reprod rate';         bibkey.Ri  = 'Wiki';   
  temp.Ri = C2K(40); units.temp.Ri = 'K'; label.temp.Ri = 'temperature';
  comment.Ri = '12 eggs per clutch in northern europe, 4 in the tropics, 1 clutch per yr';
  
% uni-variate data
% time-weight
data.tW = [ ... % time since birth (d), ln wet weight (ln g)
0.857	3.220
0.946	2.096
0.992	5.309
1.036	3.382
1.082	4.828
1.216	4.508
1.307	5.954
1.755	4.832
1.847	7.885
1.935	5.315
1.938	11.580
1.980	5.958
2.027	10.135
2.069	3.870
2.071	8.529
2.160	7.245
2.203	3.871
2.207	9.333
2.787	4.678
2.788	5.000
2.879	8.856
2.880	9.498
2.926	10.944
2.926	11.587
2.967	5.483
2.969	8.214
2.969	9.177
2.970	10.141
2.972	13.997
2.975	18.977
3.013	6.768
3.015	10.623
3.106	13.034
3.147	5.644
3.779	11.914
3.779	11.914
3.913	10.951
4.004	13.682
4.005	14.967
4.005	15.449
4.011	25.409
4.016	35.048
4.051	17.377
4.091	7.418
4.092	9.988
4.093	10.952
4.095	16.253
4.096	17.699
4.184	14.486
4.275	15.933
4.816	19.952
4.855	10.314
4.859	16.418
4.861	20.756
4.902	14.330
4.907	21.881
4.907	22.684
4.908	23.969
4.948	15.455
4.950	18.829
4.994	17.223
4.994	18.026
4.998	25.415
5.041	20.757
5.046	29.592
5.080	10.476
5.083	16.259
5.085	19.472
5.086	21.721
5.087	22.685
5.127	14.011
5.127	15.135
5.132	23.489
5.618	10.480
5.714	20.279
5.756	16.424
5.760	23.974
5.803	19.637
5.804	21.404
5.807	27.027
5.847	18.834
5.896	25.582
5.935	14.819
5.941	25.100
5.980	15.622
5.981	17.229
5.982	18.193
5.982	18.675
5.983	21.245
5.984	22.369
5.986	26.225
5.987	27.510
5.987	28.313
6.033	29.438
6.034	31.687
6.074	23.334
6.077	28.635
6.111	9.358
6.160	16.427
6.161	18.033
6.164	22.371
6.204	14.339
6.707	30.888
6.836	20.929
6.836	21.572
6.839	26.230
6.840	27.837
6.846	38.439
6.879	18.199
6.888	33.299
6.891	39.564
6.927	23.339
6.928	24.303
6.970	19.484
6.975	29.444
6.976	30.247
6.977	32.657
6.977	33.139
7.018	24.786
7.022	31.693
7.023	34.906
7.024	36.834
7.031	49.364
7.060	20.449
7.064	27.035
7.070	37.638
7.196	22.859
7.203	34.426
7.244	28.964
7.297	42.458
7.749	48.405
7.778	19.489
7.835	40.855
7.836	42.783
7.872	28.165
7.873	29.450
7.874	31.699
7.882	44.711
7.882	45.996
7.920	33.627
7.922	36.197
7.924	40.374
7.926	44.069
7.964	30.896
7.967	37.643
7.968	38.125
7.968	39.089
7.970	42.141
8.006	26.077
8.010	33.627
8.052	27.684
8.056	35.555
8.059	41.178
8.148	39.572
8.188	31.058
8.734	43.592
8.788	59.335
8.788	60.139
8.857	22.709
8.857	23.834
8.867	40.862
8.867	41.826
8.869	44.717
8.870	46.002
8.911	39.577
8.913	42.790
8.956	40.059
8.993	25.923
8.997	32.349
8.998	34.437
9.036	21.747
9.041	31.224
9.045	38.775
9.046	40.220
9.049	44.718
9.049	45.522
9.050	46.807
9.087	32.349
9.278	54.359
9.725	50.506
9.768	46.330
9.776	62.073
9.797	18.699
9.803	28.659
9.813	46.490
9.816	51.952
9.856	43.117
9.857	45.206
9.858	47.615
9.890	24.483
9.900	41.511
9.903	46.812
9.944	41.190
9.952	54.202
9.953	56.612
9.954	57.736
9.988	38.781
9.991	44.885
10.027	29.464
10.028	30.910
10.029	32.837
10.038	47.777
10.038	49.062
10.040	50.990
10.040	52.596
10.077	37.336
10.078	39.424
10.078	40.066
10.079	40.870
10.080	42.315
10.080	43.761
10.129	49.545
10.133	57.416
10.220	52.919
10.846	47.782
10.846	49.067
10.848	52.120
10.850	54.690
10.857	67.381
10.883	34.931
10.895	56.457
10.899	63.686
10.985	56.458
10.986	58.707
10.987	60.153
11.027	50.836
11.028	52.442
11.029	53.727
11.033	61.599
11.034	63.526
11.068	44.089
11.069	45.374
11.070	47.784
11.071	49.069
11.075	56.137
11.076	57.904
11.077	59.511
11.078	62.242
11.114	45.535
11.132	77.342
11.170	65.294
11.202	42.805
11.204	46.660
11.290	39.914
11.475	49.714
11.706	61.924
11.843	65.781
11.845	69.636
11.881	52.448
11.885	59.998
11.919	41.363
11.926	54.215
11.929	58.231
11.929	59.034
11.964	40.721
11.973	57.107
11.977	64.014
11.981	71.404
12.017	55.501
12.019	58.713
12.020	60.159
12.020	61.284
12.024	67.228
12.060	51.324
12.067	64.497
12.105	52.931
12.106	54.216
12.110	60.481
12.114	68.513
12.148	48.273
12.148	48.433
12.155	61.927
12.196	53.735
12.236	45.542
12.242	56.787
12.283	50.040
12.647	58.075
12.648	60.967
12.780	55.506
12.783	60.646
12.824	53.578
12.832	67.715
12.862	42.494
12.869	54.221
12.869	54.864
12.875	64.020
12.876	66.912
12.877	68.358
12.910	46.832
12.911	49.884
12.919	63.217
12.922	68.679
12.962	59.201
12.963	61.611
13.006	57.756
13.012	69.644
13.020	83.138
13.052	59.684
13.052	60.487
13.055	65.788
13.092	51.652
13.104	72.857
13.104	73.821
13.172	33.821
13.187	61.291
13.188	63.058
13.192	69.645
13.193	71.733
13.725	60.492
13.730	68.042
13.775	69.488
13.777	72.540
13.816	61.456
13.852	46.516
13.852	46.998
13.859	58.243
13.864	67.721
13.865	69.649
13.865	69.970
13.896	45.553
13.898	47.802
13.903	56.477
13.905	60.814
13.906	62.742
13.908	65.473
13.912	72.862
13.941	44.589
13.943	48.445
13.946	54.549
13.947	55.513
13.951	61.939
13.951	63.063
13.952	64.348
13.959	77.039
13.995	60.815
14.001	71.256
14.045	70.453
14.049	77.843
14.073	39.450
14.080	52.462
14.084	59.048
14.086	63.867
14.096	81.377
14.117	38.807
14.179	68.366
14.180	70.454
14.219	59.691
14.581	65.798
14.677	76.723
14.810	73.511
14.810	74.635
14.811	75.438
14.812	77.366
14.813	78.651
14.842	50.860
14.849	63.872
14.895	64.997
14.901	75.439
14.930	46.845
14.936	58.250
14.943	70.459
14.943	71.744
14.944	72.066
14.978	52.949
14.982	60.982
14.983	61.785
14.983	62.909
14.986	67.407
14.986	68.371
14.987	69.014
14.993	80.098
14.996	85.239
15.017	42.026
15.029	63.873
15.074	64.838
15.080	74.797
15.114	55.199
15.120	65.802
15.121	68.372
15.122	70.139
15.123	71.264
15.160	58.091
15.165	66.766
15.204	56.806
15.210	67.409
15.218	81.385
15.389	65.964
15.659	66.448
15.784	50.384
15.795	70.304
15.839	67.895
15.877	55.686
15.878	56.971
15.878	58.256
15.879	59.381
15.880	60.345
15.880	60.666
15.881	63.076
15.884	68.056
15.887	73.357
15.925	61.470
15.928	66.128
15.928	67.413
15.932	74.321
15.974	69.020
15.975	69.823
15.975	70.305
16.017	65.165
16.025	79.301
16.060	61.470
16.061	63.077
16.062	64.523
16.067	73.519
16.068	76.089
16.110	70.788
16.113	75.607
16.116	81.872
16.157	74.804
16.158	77.375
16.159	77.857
16.202	74.965
16.288	69.022
16.689	62.278
16.779	62.599
16.782	68.222
16.820	56.174
16.833	78.985
16.870	65.170
16.915	65.010
16.919	72.882
16.921	75.934
16.923	80.110
16.954	55.532
16.958	63.243
16.961	68.223
16.963	71.757
16.970	83.324
16.973	88.304
17.010	75.934
17.014	81.878
17.058	80.915
17.099	73.365
17.103	81.236
17.139	64.208
17.140	67.100
17.141	67.903
17.141	69.188
17.142	69.670
17.186	69.028
17.189	74.329
17.229	65.012
17.231	69.671
17.237	78.988
17.812	65.176
17.860	69.675
17.861	71.602
17.861	72.566
17.862	72.888
17.863	75.779
17.864	76.582
17.865	79.795
17.897	56.342
17.903	66.301
17.910	79.314
17.936	45.900
17.949	67.908
17.953	76.422
17.954	77.707
17.956	80.599
17.995	70.318
17.995	71.282
18.002	83.491
18.004	86.222
18.004	86.543
18.033	59.073
18.037	65.820
18.038	66.624
18.089	78.512
18.093	85.901
18.127	65.178
18.127	65.178
18.132	74.335
18.138	85.098
18.167	56.665
18.168	58.753
18.177	74.817
18.202	40.601
18.208	50.400
18.397	67.750
18.712	67.913
18.747	51.046
18.750	56.508
18.752	60.203
18.757	68.877
18.799	63.576
18.802	69.520
18.805	74.179
18.845	65.504
18.851	75.785
18.894	73.376
18.929	55.866
18.933	62.613
18.937	70.645
18.947	88.156
18.979	64.541
18.980	67.272
18.981	68.718
18.988	80.445
18.988	81.248
18.989	81.891
19.020	57.473
19.025	67.273
19.028	71.289
19.033	80.767
19.034	83.498
19.035	85.265
19.068	62.775
19.068	63.739
19.070	66.952
19.075	75.948
19.076	77.072
19.076	77.233
19.077	78.518
19.080	85.426
19.113	62.614
19.114	65.024
19.117	70.325
19.118	71.771
19.119	73.860
19.122	79.000
19.122	79.643
19.124	82.534
19.124	83.337
19.125	84.944
19.171	87.033
19.206	69.683
19.208	72.575
19.307	89.925
19.794	76.755
19.825	53.302
19.834	68.402
19.834	69.045
19.837	73.703
19.841	81.896
19.881	72.740
19.926	72.740
19.967	65.190
19.967	65.833
19.971	73.544
19.973	76.114
20.017	74.347
20.019	77.721
20.019	78.042
20.022	84.146
20.022	84.468
20.025	89.769
20.062	75.151
20.062	75.793
20.100	63.424
20.108	77.561
20.147	65.834
20.156	81.898
20.156	83.183
20.157	83.505
20.185	54.750
20.187	58.605
20.188	59.569
20.188	60.051
20.189	61.336
20.192	67.119
20.194	71.135
20.195	71.939
20.281	65.353
20.328	69.048
20.824	72.907
20.826	76.923
20.826	77.244
20.828	79.814
20.862	60.055
20.867	69.373
20.868	72.264
20.910	66.321
20.921	85.919
20.921	86.562
20.961	76.924
20.999	64.394
21.001	69.534
21.002	70.819
21.003	72.105
21.007	78.691
21.007	79.173
21.047	70.338
21.047	71.302
21.049	73.390
21.049	74.193
21.098	81.583
21.099	83.350
21.191	88.009
21.721	72.109
21.804	59.580
21.805	61.347
21.807	64.399
21.808	67.130
21.817	82.712
21.818	84.479
21.859	78.054
21.896	64.399
21.899	69.058
21.899	69.058
21.947	75.002
21.949	78.858
21.950	80.625
21.989	70.504
21.993	76.930
21.993	77.412
22.030	63.597
22.031	64.079
22.032	66.167
22.033	68.095
22.035	71.951
22.040	81.428
22.041	82.714
22.063	41.429
22.075	62.634
22.077	66.328
22.080	72.593
22.121	65.686
22.122	65.847
22.130	80.465
22.169	70.345
22.171	73.558
22.203	50.265
22.204	52.032
22.217	76.128
22.311	84.482
22.710	74.204
22.711	76.132
22.877	53.000
22.887	69.546
22.930	66.816
22.937	79.988
22.969	56.856
22.975	67.780
22.980	76.776
22.981	77.097
23.019	65.852
23.022	70.672
23.022	70.993
23.022	71.475
23.026	78.222
23.061	59.588
23.063	63.925
23.064	65.210
23.066	68.423
23.068	72.278
23.069	75.331
23.071	79.025
23.073	81.274
23.076	86.415
23.109	66.496
23.112	71.476
23.198	65.211
23.200	68.103
23.207	79.830
23.736	63.287
23.736	64.251
23.746	81.118
23.787	73.890
23.791	81.922
23.793	84.653
23.825	61.360
23.831	73.408
23.866	54.613
23.867	56.380
23.869	61.199
23.878	76.300
23.879	78.549
23.919	69.714
23.919	70.356
23.959	60.557
23.959	61.360
23.966	72.927
23.968	76.461
23.974	88.349
23.996	47.224
23.998	51.080
24.007	65.698
24.012	75.979
24.013	77.586
24.054	70.678
24.093	59.916
24.095	63.128
24.095	63.932
24.100	72.285
24.101	74.213
24.102	75.819
24.137	58.149
24.142	67.305
24.146	75.177
24.193	77.426
24.227	59.274
24.763	53.173
24.860	66.186
24.860	66.667
24.953	73.576
24.955	76.949
24.956	78.556
24.992	62.331
25.006	86.427
25.034	56.387
25.034	57.833
25.037	62.492
25.038	63.616
25.041	69.400
25.081	60.243
25.087	70.685
25.088	74.059
25.091	78.717
25.129	66.830
25.134	75.987
25.216	61.369
25.269	76.309
25.757	66.513
25.807	74.866
25.833	41.774
25.886	56.232
25.897	76.152
25.933	58.803
25.936	64.425
25.939	69.566
25.941	73.582
25.943	77.437
25.943	77.437
25.981	64.426
25.984	70.209
25.989	79.365
26.027	66.514
26.033	78.241
26.068	60.731
26.116	65.069
26.120	72.941
26.123	78.724
26.124	80.491
26.157	58.162
26.254	72.299
26.478	70.051
26.744	65.555
26.797	79.853
26.834	65.556
26.923	64.432
26.974	74.231
27.056	60.417
27.056	60.738
27.062	72.304
27.103	64.272
27.103	65.557
27.150	68.449
27.151	70.698
27.955	64.278
28.043	60.584
28.045	64.600
28.046	65.724
28.055	81.306
28.133	61.387
28.139	71.187];  
n = size(data.tW,1);
for i = 2:n % make sure that all times are unique
  if data.tW(i,1) <= data.tW(i-1,1)
    data.tW(i,1) = max(data.tW(i-1,1),data.tW(i,1)) + 1e-8;
  end
end
units.tW   = {'d', 'g'};  label.tW = {'time since birth', 'wet weight'};  
temp.tW    = C2K(40);  units.temp.tW = 'K'; label.temp.tW = 'temperature';
bibkey.tW = 'HildScha2017';

%% set weights for all real data
weights = setweights(data, []);
weights.tW = weights.tW * 2;

%% set pseudodata and respective weights
[data, units, label, weights] = addpseudodata(data, units, label, weights);
weights.psd.k_J = 0; weights.psd.k = 1;

%% pack auxData and txtData for output
auxData.temp = temp;
txtData.units = units;
txtData.label = label;
txtData.bibkey = bibkey;
txtData.comment = comment;

%% Discussion points
D1 = 'Body temperature is guessed';
D2 = 'Feeding is intitially reduced after hatch';
D3 = 'mod_1: Pseudo-data point k is used, rather than k_J; Data set tp and parameter t_R are added, the latter replacing clutch interval t_N. Postnatal T is based on PrinPres1991, see <a href="https://debtool.debtheory.org/lib/pet/html/get_T_Aves.html">get_T_Aves</a>. See further the <a href="https://debportal.debtheory.org/docs/Revision.html">revision page, theme puberty</a>';
metaData.discussion = struct('D1',D1, 'D2',D2, 'D3',D3);

%% Links
metaData.links.id_CoL = '7DLHC'; % Cat of Life
metaData.links.id_ITIS = '178117'; % ITIS
metaData.links.id_EoL = '45509694'; % Ency of Life
metaData.links.id_Wiki = 'Upupa_epops'; % Wikipedia
metaData.links.id_ADW = 'Upupa_epops'; % ADW
metaData.links.id_Taxo = '55348'; % Taxonomicon
metaData.links.id_WoRMS = '1451644'; % WoRMS
metaData.links.id_avibase = 'F4D0DB8E39216416'; % avibase
metaData.links.id_birdlife = 'common-hoopoe-upupa-epops'; % birdlife
metaData.links.id_AnAge = 'Upupa_epops'; % AnAge

%% References
bibkey = 'Wiki'; type = 'Misc'; bib = ...
'howpublished = {\url{http://en.wikipedia.org/wiki/Upupa_epops}}';
metaData.biblist.(bibkey) = ['''@', type, '{', bibkey, ', ' bib, '}'';'];
%
bibkey = 'Kooy2010'; type = 'Book'; bib = [ ...  % used in setting of chemical parameters and pseudodata
'author = {Kooijman, S.A.L.M.}, ' ...
'year = {2010}, ' ...
'title  = {Dynamic Energy Budget theory for metabolic organisation}, ' ...
'publisher = {Cambridge Univ. Press, Cambridge}, ' ...
'pages = {Table 4.2 (page 150), 8.1 (page 300)}, ' ...
'howpublished = {\url{../../../bib/Kooy2010.html}}'];
metaData.biblist.(bibkey) = ['''@', type, '{', bibkey, ', ' bib, '}'';'];
%
bibkey = 'HildScha2017'; type = 'Article'; bib = [ ... 
'author = {B. Hildebrandt and M. Schaub}, ' ... 
'doi = {10.1111/ibi.12529}, ' ...
'year = {2017}, ' ...
'title = {The effects of hatching asynchrony on growth and mortality patterns in {E}urasian Hoopoe \emph{Upupa epops} nestlings}, ' ...
'journal = {Ibis}, ' ...
'volume = {160}, ' ...
'pages = {145-157}'];
metaData.biblist.(bibkey) = ['''@', type, '{', bibkey, ', ' bib, '}'';'];
%
bibkey = 'AnAge'; type = 'Misc'; bib = ...
'howpublished = {\url{http://genomics.senescence.info/species/entry.php?species=Upupa_epops}}';
metaData.biblist.(bibkey) = ['''@', type, '{', bibkey, ', ' bib, '}'';'];
%
bibkey = 'EoL'; type = 'Misc'; bib = ...
'howpublished = {\url{http://eol.org/pages/917145/overview}}';
metaData.biblist.(bibkey) = ['''@', type, '{', bibkey, ', ' bib, '}'';'];
%
bibkey = 'PrinPres1991'; type = 'Article'; bib = [ ... 
'doi = {10.1016/0300-9629(91)90122-S}, ' ...
'author = {R. Prinzinger and A.Pre{\ss}mar and E. Schleucher}, ' ... 
'year = {1991}, ' ...
'title = {Body temperature in birds}, ' ...
'journal = {Comp. Biochem. Physiol.}, ' ...
'volume = {99A(4)}, ' ...
'pages = {499-506}'];
metaData.biblist.(bibkey) = ['''@', type, '{', bibkey, ', ' bib, '}'';'];

