Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pyrost
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Nikolay Ivanov
pyrost
Commits
e90a37bf
Commit
e90a37bf
authored
4 years ago
by
simply-nicky
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev0'
parents
dbbc7eb1
ea4b7f04
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/conf.py
+1
-1
1 addition, 1 deletion
docs/conf.py
pyrost/bin/beam_calc.pyx
+5
-7
5 additions, 7 deletions
pyrost/bin/beam_calc.pyx
setup.py
+1
-1
1 addition, 1 deletion
setup.py
with
7 additions
and
9 deletions
docs/conf.py
+
1
−
1
View file @
e90a37bf
...
@@ -22,7 +22,7 @@ copyright = '2020, Nikolay Ivanov'
...
@@ -22,7 +22,7 @@ copyright = '2020, Nikolay Ivanov'
author
=
'
Nikolay Ivanov
'
author
=
'
Nikolay Ivanov
'
# The full version, including alpha/beta/rc tags
# The full version, including alpha/beta/rc tags
release
=
'
0.1.
7
'
release
=
'
0.1.
8
'
# -- General configuration ---------------------------------------------------
# -- General configuration ---------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
pyrost/bin/beam_calc.pyx
+
5
−
7
View file @
e90a37bf
...
@@ -2,9 +2,9 @@ cimport numpy as np
...
@@ -2,9 +2,9 @@ cimport numpy as np
import
numpy
as
np
import
numpy
as
np
from
.beam_calc
cimport
*
from
.beam_calc
cimport
*
from
libc.math
cimport
sqrt
,
cos
,
sin
,
pi
,
erf
from
libc.math
cimport
sqrt
,
cos
,
sin
,
pi
,
erf
from
libc.time
cimport
time_t
,
time
from
cython.parallel
import
prange
from
cython.parallel
import
prange
cimport
openmp
cimport
openmp
from
posix.time
cimport
clock_gettime
,
timespec
,
CLOCK_REALTIME
ctypedef
np
.
complex128_t
complex_t
ctypedef
np
.
complex128_t
complex_t
ctypedef
np
.
uint64_t
uint_t
ctypedef
np
.
uint64_t
uint_t
...
@@ -300,9 +300,8 @@ def barcode_steps(double x0, double x1, double br_dx, double rd):
...
@@ -300,9 +300,8 @@ def barcode_steps(double x0, double x1, double br_dx, double rd):
gsl_rng
*
r
=
gsl_rng_alloc
(
gsl_rng_mt19937
)
gsl_rng
*
r
=
gsl_rng_alloc
(
gsl_rng_mt19937
)
double
bs_min
=
max
(
1
-
rd
,
0
),
bs_max
=
min
(
1
+
rd
,
2
)
double
bs_min
=
max
(
1
-
rd
,
0
),
bs_max
=
min
(
1
+
rd
,
2
)
double
[::
1
]
bx_arr
=
np
.
empty
(
br_n
,
dtype
=
np
.
float64
)
double
[::
1
]
bx_arr
=
np
.
empty
(
br_n
,
dtype
=
np
.
float64
)
timespec
ts
time_t
t
=
time
(
NULL
)
clock_gettime
(
CLOCK_REALTIME
,
&
ts
)
gsl_rng_set
(
r
,
t
)
gsl_rng_set
(
r
,
ts
.
tv_sec
+
ts
.
tv_nsec
)
if
br_n
:
if
br_n
:
bx_arr
[
0
]
=
x0
+
br_dx
*
((
bs_max
-
bs_min
)
*
gsl_rng_uniform_pos
(
r
)
-
1
)
bx_arr
[
0
]
=
x0
+
br_dx
*
((
bs_max
-
bs_min
)
*
gsl_rng_uniform_pos
(
r
)
-
1
)
for
i
in
range
(
1
,
br_n
):
for
i
in
range
(
1
,
br_n
):
...
@@ -457,10 +456,9 @@ def make_frames(double[:, ::1] i_x, double[::1] i_y, double[::1] sc_x, double[::
...
@@ -457,10 +456,9 @@ def make_frames(double[:, ::1] i_x, double[::1] i_y, double[::1] sc_x, double[::
uint_t
[:,
:,
::
1
]
frames
=
np
.
empty
((
a
,
b
,
c
),
dtype
=
np
.
uint64
)
uint_t
[:,
:,
::
1
]
frames
=
np
.
empty
((
a
,
b
,
c
),
dtype
=
np
.
uint64
)
double
[::
1
]
i_ys
=
np
.
empty
(
b
,
dtype
=
np
.
float64
)
double
[::
1
]
i_ys
=
np
.
empty
(
b
,
dtype
=
np
.
float64
)
gsl_rng
*
r
=
gsl_rng_alloc
(
gsl_rng_mt19937
)
gsl_rng
*
r
=
gsl_rng_alloc
(
gsl_rng_mt19937
)
time
spec
ts
time
_t
t
=
time
(
NULL
)
unsigned
long
seed
unsigned
long
seed
clock_gettime
(
CLOCK_REALTIME
,
&
ts
)
gsl_rng_set
(
r
,
t
)
gsl_rng_set
(
r
,
ts
.
tv_sec
+
ts
.
tv_nsec
)
for
i
in
range
(
b
):
for
i
in
range
(
b
):
i_ys
[
i
]
=
convolve_c
(
i_y
,
sc_y
,
i
)
i_ys
[
i
]
=
convolve_c
(
i_y
,
sc_y
,
i
)
for
i
in
prange
(
a
,
schedule
=
'
guided
'
,
nogil
=
True
):
for
i
in
prange
(
a
,
schedule
=
'
guided
'
,
nogil
=
True
):
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
e90a37bf
...
@@ -39,7 +39,7 @@ with open('README.md', 'r') as readme:
...
@@ -39,7 +39,7 @@ with open('README.md', 'r') as readme:
long_description
=
readme
.
read
()
long_description
=
readme
.
read
()
setup
(
name
=
'
pyrost
'
,
setup
(
name
=
'
pyrost
'
,
version
=
'
0.1.
7
'
,
version
=
'
0.1.
8
'
,
author
=
'
Nikolay Ivanov
'
,
author
=
'
Nikolay Ivanov
'
,
author_email
=
"
nikolay.ivanov@desy.de
"
,
author_email
=
"
nikolay.ivanov@desy.de
"
,
long_description
=
long_description
,
long_description
=
long_description
,
...
...
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