Documentation for detector.orbits
axial_tilt(equatorial_coords, earth_tilt)
Rotate a vector by an angle tilt
around the x-axis.
Convert from equatorial to ecliptic coordinates when earth_tilt
is the positive Earth's tilt.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
equatorial_coords |
ArrayLike
|
Vector in equatorial coordinates. |
required |
earth_tilt |
float
|
Angle to rotate around the x-axis. |
required |
Returns:
Type | Description |
---|---|
Array
|
Vector in ecliptic coordinates. |
Source code in src/jax_gw/detector/orbits.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
|
create_cartwheel_arm_lengths(ecc, r, N, times, freq=1.0)
Create the scalar separations for a cartwheel orbit.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ecc |
float
|
Eccentricity of the orbit. |
required |
r |
float
|
Radius of the orbit of the guiding center. |
required |
N |
int
|
Number of spacecraft. |
required |
times |
array
|
Times at which to evaluate the orbit. |
required |
Returns:
Type | Description |
---|---|
array
|
Separations. Dimensions: (len(times), N, N). |
Source code in src/jax_gw/detector/orbits.py
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
|
create_cartwheel_orbit(ecc, r, N, times, timeshift=0, freq=1.0)
Create a cartwheel orbit.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ecc |
float
|
Eccentricity of the orbits. |
required |
r |
float
|
Radius of the orbit of the guiding center. Units: AU. |
required |
N |
int
|
Number of spacecraft. |
required |
times |
ArrayLike
|
Times at which to evaluate the orbit. Units: years. |
required |
Returns:
Type | Description |
---|---|
Array
|
Orbit. Dimensions: (N, 3, len(times)). Units: AU. |
Source code in src/jax_gw/detector/orbits.py
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 |
|
create_circular_orbit_xy(r, f_orb, times)
Create an orbit around the Sun with x and y Arms.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
r |
float
|
Radius of the orbit. |
required |
times |
array
|
Times at which to evaluate the orbit. |
required |
Returns:
Type | Description |
---|---|
array
|
Orbit. Dimensions: (1, 3, len(times)). |
Source code in src/jax_gw/detector/orbits.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|
earthbound_ifo_pipeline(lat, lon, times, r, L_arm, psi=0, beta_arm=jnp.pi / 2)
Create the orbits of the spacecraft for an Earthbound interferometer. Currently only works for perpendicular arms and assumes a circular orbit with the Earth modeled as a sphere.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
lat |
float
|
Earth latitude in radians. Zero is the equator, +pi/2 is the North pole. |
required |
lon |
float
|
Earth longitude in radians. Zero is the Greenwich meridian, positive is East. |
required |
times |
array
|
Times at which to evaluate the orbit in years. |
required |
r |
float
|
Radius of the orbit in AU. |
required |
L_arm |
float
|
Length of the arms in km. |
required |
psi |
float
|
Angle between the X arm and local East in radians. Positive North of East. The Y arm is rotated by an additional pi/2. |
0
|
beta_arm |
float
|
Angle between the X and Y arms in radians. |
pi / 2
|
Returns:
Type | Description |
---|---|
array
|
Orbits of the N=3 points defining the interferometer. Dimensions: (N, 3, len(times)). |
Source code in src/jax_gw/detector/orbits.py
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 |
|
ecliptic_timeshift(ecliptic_coords, angle, tilt)
Rotate a vector in ecliptic coordinates by an angle angle
around the z-axis of equatorial coordinates.
Shift ecliptic coordinates to a hour angle
later.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ecliptic_coords |
ArrayLike
|
Vector in ecliptic coordinates. |
required |
angle |
ArrayLike
|
Angle to rotate around the z-axis of equatorial coordinates. |
required |
tilt |
float
|
Angle to rotate around the x-axis. |
required |
Returns:
Type | Description |
---|---|
Array
|
Vector in equatorial coordinates at time shifted by |
Source code in src/jax_gw/detector/orbits.py
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
|
equatorial_timeshift(equatorial_coords, angle)
Rotate a vector by an angle angle
around the z-axis of equatorial coordinates.
Shift equatorial coordinates to a hour angle
later.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
equatorial_coords |
ArrayLike
|
Vector in equatorial coordinates. |
required |
angle |
ArrayLike
|
Angle to rotate around the z-axis. |
required |
Returns:
Type | Description |
---|---|
Array
|
Vector in equatorial coordinates at time shifted by |
Source code in src/jax_gw/detector/orbits.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|
flat_index(i, j, N)
Calculate the flat index for a pair of indices i, j.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
i |
int32
|
First index. |
required |
j |
int32
|
Second index. |
required |
N |
int
|
Possible values for i (or j). |
required |
Returns:
Type | Description |
---|---|
int32
|
Flat index for the pair of indices corresponding to the pair of spacecraft. |
Source code in src/jax_gw/detector/orbits.py
377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 |
|
flat_to_matrix_indices(N)
Calculate the (N*(N-1), 2) matrix of flat indices for a given number of spacecraft.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
N |
int
|
Number of spacecraft. |
required |
Returns:
Type | Description |
---|---|
array
|
Matrix of flat indices. |
Source code in src/jax_gw/detector/orbits.py
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 |
|
flatten_pairs(matrix_form)
Flatten the separations or receiver positions from a pair of indices to a single dimension of length N * (N - 1).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
matrix_form |
array
|
Separations or receiver positions in matrix form. |
required |
Returns:
Type | Description |
---|---|
array
|
Flattened separations and receiver positions with shape (N_steps, N * (N - 1), 3). |
Source code in src/jax_gw/detector/orbits.py
434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 |
|
get_arm_lengths(separations)
Calculate the arm lengths from the vector separations.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
separations |
ndarray
|
Vector separations. Last dimension must be of length 3. |
required |
Returns:
Type | Description |
---|---|
ndarray
|
Arm lengths in shape |
Source code in src/jax_gw/detector/orbits.py
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 |
|
get_emitter_positions(position)
Calculate the emitter positions of the spacecraft for a given arm. Since the separation matrix is defined as r[i, j] = r[i] - r[j], the emitter positions must be calculated as e_pos[i, j, 3, N...] = pos[j, 3, N...].
Parameters:
Name | Type | Description | Default |
---|---|---|---|
position |
array
|
Position of the spacecraft. Shape (N, 3, ...). |
required |
Returns:
Type | Description |
---|---|
array
|
Emitter spacecraft positions for the arm. Same shape as separations. |
Source code in src/jax_gw/detector/orbits.py
351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 |
|
get_receiver_positions(position)
Calculate the receiver positions of the spacecraft for a collection of arms.
Since the separation matrix is defined as r[i, j] = r[i] - r[j]
, the
receiver positions must be defined via r_pos[i, j, 3, N...] = pos[i, 3, N...]
.
Positions has shape (N, 3, N_steps)
while separations has shape
(N_steps, N, N, 3)
. Therefore, we need to create a newaxis for the j
index,
and finally move the time axis to the front.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
position |
ArrayLike
|
Position of the spacecraft. Shape (N, 3, ...). |
required |
Returns:
Type | Description |
---|---|
Array
|
Receiver spacecraft positions for the arm. Shape broadcastable to the shape of separations. |
Source code in src/jax_gw/detector/orbits.py
319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 |
|
get_separations(orbits)
Calculate the vector separations between the spacecraft.
r_{ij} = r_i - r_j
Parameters:
Name | Type | Description | Default |
---|---|---|---|
orbits |
ArrayLike
|
Array of shape |
required |
Returns:
Type | Description |
---|---|
Array
|
Vector separations. Dimensions: |
Source code in src/jax_gw/detector/orbits.py
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 |
|
get_vertex_angle(orbits)
get the angle between the two arms of the interferometer using the initial positions of the two arms
Source code in src/jax_gw/detector/orbits.py
20 21 22 23 24 25 26 27 28 29 30 31 |
|
lat_lon_to_cartesian(lat, lon, r=1)
Convert latitude and longitude to equatorial cartesian coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
lat |
float
|
Latitude in radians. |
required |
lon |
float
|
Longitude in radians. |
required |
r |
float
|
Radius. |
1
|
Returns:
Type | Description |
---|---|
array
|
Equatorial cartesian coordinates. |
Source code in src/jax_gw/detector/orbits.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
|
path_from_indices(indices)
Convert an array of indices of spacecraft and length N_depth+1 to a path that is a 1D array of length N_depth and contains the arm index for each part of the path.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
indices |
array
|
Array of indices of spacecraft and length N_depth+1. |
required |
Returns:
Type | Description |
---|---|
array
|
Path that is a 1D array of length N_depth and contains the arm index for each part of the path. |
Source code in src/jax_gw/detector/orbits.py
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 |
|