-
Notifications
You must be signed in to change notification settings - Fork 13
/
LB_Analysis_Period.json
85 lines (85 loc) 路 2.58 KB
/
LB_Analysis_Period.json
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{
"description": "Create an Analysis Period to describe a slice of time during the year.\n-",
"outputs": [
[
{
"type": null,
"name": "period",
"description": "Analysis period.",
"access": "None",
"default": null
},
{
"type": null,
"name": "hoys",
"description": "List of dates in this analysis period.",
"access": "None",
"default": null
},
{
"type": null,
"name": "dates",
"description": "List of hours of the year in this analysis period.",
"access": "None",
"default": null
}
]
],
"code": "\ntry:\n import ladybug.analysisperiod as ap\nexcept ImportError as e:\n raise ImportError('\\nFailed to import ladybug:\\n\\t{}'.format(e))\n\ntry:\n from ladybug_{{cad}}.{{plugin}} import wrap_output, turn_off_old_tag\nexcept ImportError as e:\n raise ImportError('\\nFailed to import ladybug_{{cad}}:\\n\\t{}'.format(e))\nturn_off_old_tag(ghenv.Component)\n\n\nanp = ap.AnalysisPeriod(\n _start_month_, _start_day_, _start_hour_,\n _end_month_, _end_day_, _end_hour_, _timestep_)\n\nif anp:\n period = anp\n dates = wrap_output(anp.datetimes)\n hoys = anp.hoys",
"name": "LB Analysis Period",
"version": "1.7.1",
"category": "Ladybug",
"subcategory": "1 :: Analyze Data",
"nickname": "AnalysisPeriod",
"inputs": [
{
"type": "int",
"name": "_start_month_",
"description": "Start month (1-12).",
"access": "item",
"default": 1
},
{
"type": "int",
"name": "_start_day_",
"description": "Start day (1-31).",
"access": "item",
"default": 1
},
{
"type": "int",
"name": "_start_hour_",
"description": "Start hour (0-23).",
"access": "item",
"default": 0
},
{
"type": "int",
"name": "_end_month_",
"description": "End month (1-12).",
"access": "item",
"default": null
},
{
"type": "int",
"name": "_end_day_",
"description": "End day (1-31).",
"access": "item",
"default": null
},
{
"type": "int",
"name": "_end_hour_",
"description": "End hour (0-23).",
"access": "item",
"default": null
},
{
"type": "int",
"name": "_timestep_",
"description": "An integer number for the number of time steps per hours.\nAcceptable inputs include: 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60",
"access": "item",
"default": null
}
]
}