question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Retrieve all TPFs per chip

See original GitHub issue

Issue description

Is it possible to call for the TPFs as a function of the chip? Or even “all per campaign”

Example

import lightkurve
TPFs = lightkurve.KeplerTargetPixelFile.from_archive(chip=42, campaign=0)

Expected behavior

I expected that the chip kwarg is would exist and that the target kwarg would not be required; much like campaign vs quarter, I was expecting chip to replace target.

I would like to download the TPF files from every target observed, per chip per campaign. Or at least be able to list the EPIC numbers for each TPF per chip per campaign.

Environment:

  • platform: OSX
  • lightkurve version: 1.0b19
  • installation method: pip

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
barentsencommented, Oct 14, 2018

Unfortunately the MAST Portal API does not support queries on mission-specific meta data at this, such as Kepler CCD identifier. So far the only work-around is to query targets manually using e.g. the web-based Kepler or CasJobs interfaces at MAST, or to use the older MAST web services (cf. https://archive.stsci.edu/vo/mast_services.html).

Supporting CCD-based searches is on our wish list but we are waiting for the MAST Portal API to support such queries. Until then, I am going to close this issue.

/cc @mustaric @scfleming

0reactions
exowanderercommented, Oct 15, 2018

This is all very useful. Thank you both for the helpful conversation.

At this point, does the information that lightkurve grabs (even if not in the TPF class) include the chip number? I see channel; but I don’t know what that means.

If tpf.channel is the chip number, then I’m perfectly happy to reconfigure the above script to store the lightkurve output as k2_lightkurves[campaign][channel][epic_id].


such as

# Here we loop over the `campaign_list`, which is defined above as just 1 campaign;
#    but this can be expanded to any number of campaigns (in sequence of not)
for campaign in tqdm(campaign_list, total=len(campaign_list)):
    # Allocate the exact EPIC ids to download in the next for loop
    EPIC_ids = k2targets['epic_number'][campaigns_ == campaign].values
    k2_lightkurves[campaign] = {}
    for epic_id in tqdm(EPIC_ids[:n_IDs], total=len(EPIC_ids[:n_IDs])):
        # loop of the allocated EPIC ids and download them one-by-one
        dummy_ = lk.KeplerTargetPixelFile.from_archive(target=epic_id);
        
        # Check if the channel has been accessed before
        if dummy_.channel not in k2_lightkurves[campaign].keys(): 
            # If not yet accessed, then create the sub-dict
            k2_lightkurves[campaign][dummy_.channel] = {}
        
        k2_lightkurves[campaign][dummy_.channel][epic_id] = dummy_
Read more comments on GitHub >

github_iconTop Results From Across the Web

Target Pixel Files - TESS Science Support Center - HEASARC
TPFs can be thought of as stacks of images, with one image for every ... can extract a light-curve by simply summing up...
Read more >
christopherburke/tesscut - GitHub
Open question is what to do when returning a TPF that spans multiple chips/cameras: separate TPF return files, single return file? Nice-to-have: Sum...
Read more >
API
Finds the TESS sector, camera, chip, and position on chip for the source. sector ¶ ... height (int, optional) – Height in pixels...
Read more >
California warehouse solutions for all - TPFS Warehouse | Home
We are an experienced full service warehouse and logistics service company. We have many locations to serve you, with a variety of equipment...
Read more >
Debian - Next Thing Co. C.H.I.P. - GitBook
In computing, Virtual Network Computing (VNC) is a graphical desktop sharing system that uses the Remote Frame Buffer protocol (RFB) to remotely control ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found