Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fermilat-web
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
einsteinathome
fermilat-web
Commits
e1069143
Commit
e1069143
authored
8 years ago
by
Colin Clark
Browse files
Options
Downloads
Patches
Plain Diff
Adding pulsars-by-time graph
parent
fa7a8a4d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
psrs_by_time.py
+86
-0
86 additions, 0 deletions
psrs_by_time.py
with
86 additions
and
0 deletions
psrs_by_time.py
0 → 100644
+
86
−
0
View file @
e1069143
import
matplotlib.pyplot
as
plt
from
matplotlib.ticker
import
ScalarFormatter
import
numpy
as
np
plt
.
rc
(
'
text
'
,
usetex
=
True
)
plt
.
rc
(
'
font
'
,
family
=
'
serif
'
)
# Timeline of pulsar discoveries: [month since launch, total psrs]
# -------------------------------------------------------------------------------------
# By T_obs
# psr_timeline = np.array([[0,0],
# [2,1], # CTA 1
# [5,15], # 16 PSRs - CTA1, Abdo et al., 2009
# [11,8], # 8 PSRs, Saz Parkinson et al., 2010
# [23,2], # 2 PSRs, Saz Parkinson et al., 2010
# [32,10], # 9 Pulsars + J1838, Pletsch et al. 2012
# [36,4], # 4 E@H Pulsars, 2013
# [47,1], # J1311-3430
# [68,10], # First bunch of FGRP4 pulsars - 2 MSPs
# [74, 4], # Next bunch of FGRP4 pulsars - J1208
# [91, 0]] ) # Now
# FGRP1_idx = 6
# FGRP4_idx = 8
# -------------------------------------------------------------------------------------
# By publication date
psr_timeline
=
np
.
array
([[
0
,
0
],
[
4
,
1
],
# CTA 1
[
12
,
15
],
# 16 PSRs - CTA1, Abdo et al., 2009
[
27
,
8
],
# 8 PSRs, Saz Parkinson et al., 2010
[
33
,
2
],
# 2 PSRs, Saz Parkinson et al., 2010
[
39
,
9
],
# 9 Pulsars, Pletsch et al. 2012
[
47
,
1
],
# J1838
[
47
,
1
],
# J1311-3430
[
64
,
4
],
# 4 E@H Pulsars, 2013
[
84
,
1
],
# J1906
[
91
,
13
],
# Next bunch of FGRP4 pulsars without J1208
[
95
,
0
]]
)
# Now
FGRP1_idx
=
8
FGRP4_idx
=
9
AEI_idx
=
5
# -------------------------------------------------------------------------------------
start
=
54682
mjd2008
=
54466
months
=
2008
+
(
psr_timeline
[:,
0
]
*
(
365.25
/
12
)
+
(
start
-
mjd2008
))
/
365.25
psrs
=
np
.
cumsum
(
psr_timeline
[:,
1
])
xfmt
=
ScalarFormatter
(
useOffset
=
False
)
fig
=
plt
.
figure
(
figsize
=
(
10
,
5.5
))
ax
=
fig
.
add_subplot
(
111
)
plt
.
step
(
months
,
psrs
,
where
=
'
post
'
,
color
=
'
red
'
,
linewidth
=
2.0
)
plt
.
xticks
(
np
.
arange
(
2009
,
2017
))
plt
.
ylabel
(
'
Total number of pulsars discovered
'
)
plt
.
title
(
'
Timeline of gamma-ray pulsar discoveries in blind searches with Fermi LAT
'
)
ax
.
xaxis
.
set_major_formatter
(
xfmt
)
plt
.
xlim
(
months
[
0
],
months
[
-
1
])
# Survey labels
plt
.
text
(
months
[
FGRP1_idx
]
+
0.8
,
psrs
[
FGRP1_idx
]
/
2.0
,
'
E@H
\n
FGRP1
'
,
ha
=
'
center
'
)
plt
.
text
(
months
[
FGRP4_idx
]
+
0.5
,
psrs
[
-
1
]
/
2.0
,
'
E@H
\n
FGRP4
'
,
ha
=
'
center
'
)
plt
.
text
(
months
[
AEI_idx
]
+
1.0
,
psrs
[
AEI_idx
]
/
2.0
,
'
ATLAS Cluster
\n
AEI Hannover
'
,
ha
=
'
center
'
)
# Survey shading
ax
.
fill_between
([
months
[
FGRP1_idx
],
months
[
FGRP1_idx
+
1
]],[
0
,
0
],[
psrs
[
FGRP1_idx
],
psrs
[
FGRP1_idx
]],
color
=
'
darkgrey
'
)
ax
.
fill_between
([
months
[
FGRP4_idx
],
months
[
FGRP4_idx
+
1
],
months
[
FGRP4_idx
+
1
],
months
[
-
1
]],
[
0
,
0
,
0
,
0
],
[
psrs
[
FGRP4_idx
],
psrs
[
FGRP4_idx
],
psrs
[
FGRP4_idx
+
1
],
psrs
[
-
1
]],
color
=
'
grey
'
)
ax
.
fill_between
([
months
[
AEI_idx
],
months
[
AEI_idx
+
1
],
months
[
AEI_idx
+
1
],
months
[
FGRP1_idx
]],
[
0
,
0
,
0
,
0
],
[
psrs
[
AEI_idx
],
psrs
[
AEI_idx
],
psrs
[
AEI_idx
+
2
],
psrs
[
AEI_idx
+
2
]],
color
=
'
lightgrey
'
)
ax
.
spines
[
'
right
'
].
set_visible
(
False
)
ax
.
spines
[
'
top
'
].
set_visible
(
False
)
ax
.
xaxis
.
set_ticks_position
(
'
bottom
'
)
ax
.
yaxis
.
set_ticks_position
(
'
left
'
)
plt
.
savefig
(
'
img/psrs_vs_time.png
'
,
bbox_inches
=
'
tight
'
)
plt
.
show
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment