Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
L
LOFAR-calculator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Astronomy and Operations
SDC Operations
LOFAR-calculator
Commits
e21e3f0c
Commit
e21e3f0c
authored
Oct 01, 2020
by
sarrvesh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert targetvis to master version
parent
de5edeb9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
64 deletions
+2
-64
targetvis.py
targetvis.py
+2
-64
No files found.
targetvis.py
View file @
e21e3f0c
...
...
@@ -88,7 +88,6 @@ def get_tile_beam(coord):
this_coord
=
SkyCoord
(
c
)
temp_ra
+=
this_coord
.
ra
.
degree
temp_dec
+=
this_coord
.
dec
.
degree
temp_ra
=
(
temp_ra
+
180
)
%
(
360
)
-
180
# fix a problem near 24h/0h
t_beam
=
SkyCoord
(
temp_ra
/
n_beams
,
temp_dec
/
n_beams
,
unit
=
u
.
deg
)
return
t_beam
...
...
@@ -131,18 +130,9 @@ def find_beam_layout(src_name, coord, n_core, n_remote, n_int, antenna_mode):
label_offset
=
0.5
# Iterate over coord and plot the station beam
# 23h40m +72d, 0h20m +72d
index
=
0
s_beams
=
[
SkyCoord
(
c
)
for
c
in
coord_list
]
# check if we're crossing zero degrees
s_ras
=
[
s_beam
.
ra
.
deg
for
s_beam
in
s_beams
]
crossing_zero_degrees
=
False
# we need at least two beams, for the diff function
if
len
(
s_ras
)
>
1
:
if
np
.
max
(
np
.
abs
(
np
.
diff
(
s_ras
)))
>
50
:
crossing_zero_degrees
=
True
for
s_beam
in
s_beams
:
#c in coord_list:
#s_beam = SkyCoord(c)
for
c
in
coord_list
:
s_beam
=
SkyCoord
(
c
)
layout
[
'shapes'
].
append
({
'type'
:
'circle'
,
'xref'
:
'x'
,
...
...
@@ -153,42 +143,6 @@ def find_beam_layout(src_name, coord, n_core, n_remote, n_int, antenna_mode):
'y1'
:
s_beam
.
dec
.
deg
+
station_beam_size
,
'line'
:
{
'color'
:
'rgba(50, 171, 96, 1)'
}
})
if
crossing_zero_degrees
:
if
s_beam
.
ra
.
deg
>
180
:
layout
[
'shapes'
].
append
({
'type'
:
'circle'
,
'xref'
:
'x'
,
'yref'
:
'y'
,
'x0'
:
(
s_beam
.
ra
.
deg
-
station_beam_size
+
180
)
%
360
-
180
,
'x1'
:
(
s_beam
.
ra
.
deg
+
station_beam_size
+
180
)
%
360
-
180
,
'y0'
:
s_beam
.
dec
.
deg
-
station_beam_size
,
'y1'
:
s_beam
.
dec
.
deg
+
station_beam_size
,
'line'
:
{
'color'
:
'rgba(50, 171, 96, 1)'
}
})
data
.
append
(
Scatter
(
x
=
[(
s_beam
.
ra
.
deg
+
180
)
%
360
-
180
],
y
=
[
s_beam
.
dec
.
deg
+
station_beam_size
+
label_offset
],
text
=
[
src_name_list
[
index
]],
mode
=
'text'
)
)
else
:
layout
[
'shapes'
].
append
({
'type'
:
'circle'
,
'xref'
:
'x'
,
'yref'
:
'y'
,
'x0'
:
(
s_beam
.
ra
.
deg
-
station_beam_size
-
180
)
%
360
+
180
,
'x1'
:
(
s_beam
.
ra
.
deg
+
station_beam_size
-
180
)
%
360
+
180
,
'y0'
:
s_beam
.
dec
.
deg
-
station_beam_size
,
'y1'
:
s_beam
.
dec
.
deg
+
station_beam_size
,
'line'
:
{
'color'
:
'rgba(50, 171, 96, 1)'
}
})
data
.
append
(
Scatter
(
x
=
[(
s_beam
.
ra
.
deg
-
180
)
%
360
+
180
],
y
=
[
s_beam
.
dec
.
deg
+
station_beam_size
+
label_offset
],
text
=
[
src_name_list
[
index
]],
mode
=
'text'
)
)
data
.
append
(
Scatter
(
x
=
[
s_beam
.
ra
.
deg
],
y
=
[
s_beam
.
dec
.
deg
+
station_beam_size
+
label_offset
],
...
...
@@ -211,22 +165,6 @@ def find_beam_layout(src_name, coord, n_core, n_remote, n_int, antenna_mode):
'y1'
:
t_beam
.
dec
.
deg
+
TILE_BEAM_SIZE
/
2
,
'line'
:
{
'color'
:
'rgba(250, 0, 250, 1)'
}
})
if
crossing_zero_degrees
:
if
t_beam
.
ra
.
deg
>
180
:
t_offset
=-
360
else
:
t_offset
=
360
layout
[
'shapes'
].
append
({
'type'
:
'circle'
,
'xref'
:
'x'
,
'yref'
:
'y'
,
'x0'
:
t_beam
.
ra
.
deg
-
TILE_BEAM_SIZE
/
2
+
t_offset
,
'x1'
:
t_beam
.
ra
.
deg
+
TILE_BEAM_SIZE
/
2
+
t_offset
,
'y0'
:
t_beam
.
dec
.
deg
-
TILE_BEAM_SIZE
/
2
,
'y1'
:
t_beam
.
dec
.
deg
+
TILE_BEAM_SIZE
/
2
,
'line'
:
{
'color'
:
'rgba(250, 0, 250, 1)'
}
})
data
.
append
(
Scatter
(
x
=
[
t_beam
.
ra
.
deg
],
y
=
[
t_beam
.
dec
.
deg
+
TILE_BEAM_SIZE
/
2
+
label_offset
],
...
...
Write
Preview
Markdown
is supported
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