Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Caillat Michel
yafits
Commits
7d72fb76
Commit
7d72fb76
authored
Dec 17, 2019
by
Caillat Michel
Browse files
Added boundingRect to the result returned by measureBox
parent
9ae49b93
Changes
1
Hide whitespace changes
Inline
Side-by-side
yafitss/DataBlock.py
View file @
7d72fb76
...
@@ -1229,6 +1229,7 @@ class DataBlock:
...
@@ -1229,6 +1229,7 @@ class DataBlock:
result
[
"stdev"
]
=
{
"value"
:
np
.
nanstd
(
box
).
item
()
,
"unit"
:
bunit
}
result
[
"stdev"
]
=
{
"value"
:
np
.
nanstd
(
box
).
item
()
,
"unit"
:
bunit
}
result
[
"numpix"
]
=
{
"value"
:
np
.
count_nonzero
(
~
np
.
isnan
(
box
)),
"unit"
:
"pixels (!=Nan)"
}
result
[
"numpix"
]
=
{
"value"
:
np
.
count_nonzero
(
~
np
.
isnan
(
box
)),
"unit"
:
"pixels (!=Nan)"
}
result
[
"percentage of total number of pixels"
]
=
{
"value"
:
(
box
.
shape
[
0
]
*
box
.
shape
[
1
])
/
(
self
.
__header
[
"NAXIS1"
]
*
self
.
__header
[
"NAXIS2"
])
*
100
,
"unit"
:
"%"
}
result
[
"percentage of total number of pixels"
]
=
{
"value"
:
(
box
.
shape
[
0
]
*
box
.
shape
[
1
])
/
(
self
.
__header
[
"NAXIS1"
]
*
self
.
__header
[
"NAXIS2"
])
*
100
,
"unit"
:
"%"
}
result
[
"boundingRect"
]
=
{
"value"
:[
iRA0
,
iDEC0
,
iRA1
-
iRA0
,
iDEC1
-
iDEC0
],
"unit"
:
"pixels"
}
result
=
{
"status"
:
True
,
"message"
:
""
,
"result"
:
result
}
result
=
{
"status"
:
True
,
"message"
:
""
,
"result"
:
result
}
self
.
__logger
.
debug
(
"measureBox : exiting"
)
self
.
__logger
.
debug
(
"measureBox : exiting"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment