Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit 2975ad5

Browse files
committed
add optional for how spread out the fake data is
1 parent 38e5b35 commit 2975ad5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

nowcasting_dataset/data_sources/fake/coordinates.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,18 @@ def create_random_point_coordinates_osgb(
2020

2121

2222
def make_random_image_coords_osgb(
23-
size: int, x_center_osgb: Optional = None, y_center_osgb: Optional = None
23+
size: int,
24+
x_center_osgb: Optional = None,
25+
y_center_osgb: Optional = None,
26+
km_spaceing: Optional[int] = 4,
2427
):
2528
"""Make random coords for image. These are ranges for the pixels"""
2629

2730
ONE_KILOMETER = 10**3
2831

2932
# 4 kilometer spacing seemed about right for real satellite images
30-
x = 4 * ONE_KILOMETER * np.array((range(0, size)))
31-
y = 4 * ONE_KILOMETER * np.array((range(size, 0, -1)))
33+
x = km_spaceing * ONE_KILOMETER * np.array((range(0, size)))
34+
y = km_spaceing * ONE_KILOMETER * np.array((range(size, 0, -1)))
3235

3336
return add_uk_centroid_osgb(
3437
x, y, x_center_osgb=x_center_osgb, y_center_osgb=y_center_osgb, first_value_center=False

0 commit comments

Comments
 (0)