or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

asteroseismology.mdcore-data.mddata-search.mdindex.mdprf-modeling.mdsystematics-correction.mdtime-series-analysis.md

data-search.mddocs/

0

# Data Search and Access

1

2

Tools for searching and downloading time series data from NASA's space telescope archives, supporting Kepler, K2, and TESS missions with various data products and processing pipelines.

3

4

## Capabilities

5

6

### Light Curve Search

7

8

Search for processed light curve files from various pipelines including official mission products and High Level Science Products (HLSPs).

9

10

```python { .api }

11

def search_lightcurve(target, mission=None, author=None, exptime=None, **kwargs):

12

"""

13

Search for light curve files in MAST archives.

14

15

Parameters:

16

- target: str, int, or SkyCoord - Target identifier (name, KIC/TIC ID, or coordinates)

17

- mission: str or list - Mission name ('Kepler', 'K2', 'TESS')

18

- author: str or list - Data product author/pipeline ('Kepler', 'SPOC', 'QLP', 'TASOC', etc.)

19

- exptime: float or list - Exposure time in seconds

20

- sector: int or list - TESS sector number

21

- quarter: int or list - Kepler quarter number

22

- campaign: int or list - K2 campaign number

23

24

Returns:

25

SearchResult object containing matching data products

26

"""

27

28

def search_lightcurvefile(target, **kwargs):

29

"""Alias for search_lightcurve function"""

30

```

31

32

### Target Pixel File Search

33

34

Search for target pixel files containing pixel-level time series data for custom aperture photometry and detailed analysis.

35

36

```python { .api }

37

def search_targetpixelfile(target, mission=None, author=None, exptime=None, **kwargs):

38

"""

39

Search for target pixel files in MAST archives.

40

41

Parameters:

42

- target: str, int, or SkyCoord - Target identifier

43

- mission: str or list - Mission name ('Kepler', 'K2', 'TESS')

44

- author: str or list - Data product author/pipeline

45

- exptime: float or list - Exposure time in seconds

46

- sector: int or list - TESS sector number

47

- quarter: int or list - Kepler quarter number

48

- campaign: int or list - K2 campaign number

49

50

Returns:

51

SearchResult object containing matching target pixel files

52

"""

53

```

54

55

### TESS Full Frame Image Cutouts

56

57

Search for cutouts from TESS full frame images, enabling analysis of targets not in the target pixel file program.

58

59

```python { .api }

60

def search_tesscut(target, sector=None, **kwargs):

61

"""

62

Search for TESS full frame image cutouts via TESScut service.

63

64

Parameters:

65

- target: str or SkyCoord - Target identifier or coordinates

66

- sector: int or list - TESS sector number(s)

67

68

Returns:

69

SearchResult object containing cutout specifications

70

"""

71

```

72

73

### Search Results Management

74

75

Container class for managing search results with download, filtering, and inspection capabilities.

76

77

```python { .api }

78

class SearchResult:

79

"""

80

Container for search results with download and filtering capabilities.

81

82

Attributes:

83

- table: astropy.table.Table - Full search results from MAST API

84

"""

85

86

def download(self, quality_bitmask='default', download_dir=None, **kwargs):

87

"""

88

Download the first data product.

89

90

Parameters:

91

- quality_bitmask: str or int - Quality flag filtering ('default', 'hard', 'hardest', or int)

92

- download_dir: str - Local directory for downloaded files

93

- cache: bool - Whether to cache downloads (default True)

94

95

Returns:

96

LightCurve, TargetPixelFile, or TargetPixelFileCollection

97

"""

98

99

def download_all(self, quality_bitmask='default', download_dir=None, **kwargs):

100

"""

101

Download all data products in the search result.

102

103

Returns:

104

LightCurveCollection or TargetPixelFileCollection

105

"""

106

107

def __getitem__(self, key):

108

"""Access individual search results by index"""

109

110

def __len__(self):

111

"""Number of search results"""

112

113

def show_properties(self):

114

"""Display detailed properties of search results"""

115

```

116

117

## Usage Examples

118

119

### Basic Target Search

120

121

```python

122

import lightkurve as lk

123

124

# Search by target name

125

search_result = lk.search_lightcurve('Kepler-10')

126

print(f"Found {len(search_result)} light curves")

127

128

# Filter by mission and author

129

kepler_official = lk.search_lightcurve('Kepler-10', mission='Kepler', author='Kepler')

130

tess_spoc = lk.search_lightcurve('Kepler-10', mission='TESS', author='SPOC')

131

```

132

133

### Coordinate-Based Search

134

135

```python

136

from astropy.coordinates import SkyCoord

137

138

# Search using celestial coordinates

139

coord = SkyCoord(285.67942179, 50.24130576, unit='deg')

140

search_result = lk.search_lightcurve(coord, mission='TESS')

141

```

142

143

### Downloading Data

144

145

```python

146

# Download single light curve

147

lc = search_result[0].download()

148

149

# Download all available data

150

collection = search_result.download_all()

151

152

# Apply quality filtering

153

lc_filtered = search_result[0].download(quality_bitmask='hard')

154

```

155

156

### Multi-Sector/Quarter Search

157

158

```python

159

# Get all TESS sectors for a target

160

all_tess = lk.search_lightcurve('TIC 141914082', mission='TESS')

161

lc_collection = all_tess.download_all()

162

163

# Specific Kepler quarters

164

q4_q8 = lk.search_lightcurve('KIC 11904151', quarter=[4, 8])

165

```

166

167

### Target Pixel File Analysis

168

169

```python

170

# Search and download target pixel files

171

tpf_search = lk.search_targetpixelfile('Kepler-10b')

172

tpf = tpf_search[0].download()

173

174

# Create custom light curve from pixels

175

lc_custom = tpf.to_lightcurve(aperture_mask='threshold')

176

```

177

178

### TESS Cutouts

179

180

```python

181

# Get cutout for target not in TPF program

182

cutout_search = lk.search_tesscut('TIC 123456789', size=10)

183

tpf_cutout = cutout_search.download()

184

```