Skip to content

executing the mast notebooksยค

the notebooks in the mast repo are not executed. some of them are considerably and take time to execute on the fly. it makes more sense to pre compute them before operating on the documentation.

    from nobook.utils import Index

the nbconvert convert template to execute each notebook

    execute = """jupyter nbconvert \
    --to notebook --inplace \
    --execute --allow-errors \
    --ExecutePreprocessor.kernel_name=mast_nb %s"""

an example command run for one notebook

!jupyter nbconvert \
--to notebook --inplace \
--execute \
--allow-errors \
--ExecutePreprocessor.kernel_name=mast_nb \
mast_notebooks/notebooks/JWST/SI_keyword_exoplanet_search/SI_keyword_exoplanet_search.ipynb

doit task to execute all the notebooks

    def task_execute():
        for file in Index(["mast_notebooks"]).path().glob("**/*.ipynb", recursive=True).drop_duplicates():
            yield dict(
                name=str(file),
                file_dep=[file],
                actions=[
                    execute % file
                ]
            )

invoke the doit tasks

    %reload_ext doit    
    %doit list  --all 
execute                                                                                                                                                                                         
execute:mast_notebooks/contributing/notebook_template/notebook_template.ipynb                                                                                                                   
execute:mast_notebooks/notebooks/GALEX/mis-mosaic/mis_mosaic.ipynb                                                                                                                              
execute:mast_notebooks/notebooks/HSC/HCV_API/HCV_API_demo.ipynb                                                                                                                                 
execute:mast_notebooks/notebooks/HSC/HCV_CASJOBS/HCV_casjobs_demo.ipynb                                                                                                                         
execute:mast_notebooks/notebooks/HSC/HSCV3_API/hscv3_api.ipynb                                                                                                                                  
execute:mast_notebooks/notebooks/HSC/HSCV3_SMC_API/hscv3_smc_api.ipynb                                                                                                                          
execute:mast_notebooks/notebooks/HSC/HSC_TAP/HSC_TAP.ipynb                                                                                                                                      
execute:mast_notebooks/notebooks/HSC/SWEEPS_HSCV3P1/sweeps_hscv3p1.ipynb                                                                                                                        
execute:mast_notebooks/notebooks/HSC/SWEEPS_HSCV3P1_API/sweeps_hscv3p1_api.ipynb                                                                                                                
execute:mast_notebooks/notebooks/IUE/exploring_UV_extinction_curves/exploring_UV_extinction_curves.ipynb                                                                                        
execute:mast_notebooks/notebooks/JWST/Engineering_Database_Retreival/EDB_Retrieval.ipynb                                                                                                        
execute:mast_notebooks/notebooks/JWST/SI_keyword_exoplanet_search/SI_keyword_exoplanet_search.ipynb                                                                                             
execute:mast_notebooks/notebooks/JWST/download_by_program_id/download_by_program_id.ipynb                                                                                                       
execute:mast_notebooks/notebooks/JWST/duplication_checking/duplication_checking.ipynb                                                                                                           
execute:mast_notebooks/notebooks/K2/Lightcurve/Lightcurve.ipynb                                                                                                                                 
execute:mast_notebooks/notebooks/K2/TPF/TPF.ipynb                                                                                                                                               
execute:mast_notebooks/notebooks/K2/beginner_how_to_use_ffi/beginner_how_to_use_ffi.ipynb                                                                                                       
execute:mast_notebooks/notebooks/K2/removing_instrumental_noise_using_pld/removing_instrumental_noise_using_pld.ipynb                                                                           
execute:mast_notebooks/notebooks/Kepler/creating_periodograms/creating_periodograms.ipynb                                                                                                       
execute:mast_notebooks/notebooks/Kepler/how_to_estimate_a_stars_mass_and_radius_using_asteroseismology/how_to_estimate_a_stars_mass_and_radius_using_asteroseismology.ipynb                     
execute:mast_notebooks/notebooks/Kepler/how_to_understand_and_manipulate_the_periodogram_of_an_oscillating_star/how_to_understand_and_manipulate_the_periodogram_of_an_oscillating_star.ipynb   
execute:mast_notebooks/notebooks/Kepler/identifying_transiting_planet_signals/identifying_transiting_planet_signals.ipynb                                                                       
execute:mast_notebooks/notebooks/Kepler/instrumental_noise_1_data_gaps_and_quality_flags/instrumental_noise_1_data_gaps_and_quality_flags.ipynb                                                 
execute:mast_notebooks/notebooks/Kepler/instrumental_noise_2_spurious_signals_and_time_sampling_effects/instrumental_noise_2_spurious_signals_and_time_sampling_effects.ipynb                   
execute:mast_notebooks/notebooks/Kepler/instrumental_noise_3_seasonal_and_detector_effects/instrumental_noise_3_seasonal_and_detector_effects.ipynb                                             
execute:mast_notebooks/notebooks/Kepler/instrumental_noise_4_electronic_noise/instrumental_noise_4_electronic_noise.ipynb                                                                       
execute:mast_notebooks/notebooks/Kepler/lightkurve_analyzing_lc_products/lightkurve_analyzing_lc_products.ipynb                                                                                 
execute:mast_notebooks/notebooks/Kepler/lightkurve_analyzing_tpf_products/lightkurve_analyzing_tpf_products.ipynb                                                                               
execute:mast_notebooks/notebooks/Kepler/lightkurve_combining_multiple_quarters/lightkurve_combining_multiple_quarters.ipynb                                                                     
execute:mast_notebooks/notebooks/Kepler/lightkurve_custom_aperture_photometry/lightkurve_custom_aperture_photometry.ipynb                                                                       
execute:mast_notebooks/notebooks/Kepler/lightkurve_interactively_inspecting_TPFs_and_LCs/lightkurve_interactively_inspecting_TPFs_and_LCs.ipynb                                                 
execute:mast_notebooks/notebooks/Kepler/lightkurve_searching_for_data/lightkurve_searching_for_data.ipynb                                                                                       
execute:mast_notebooks/notebooks/Kepler/measuring_a_rotation_period/measuring_a_rotation_period.ipynb                                                                                           
execute:mast_notebooks/notebooks/Kepler/plotting_catalog_over_FFI/plotting_catalog_over_FFI.ipynb                                                                                               
execute:mast_notebooks/notebooks/Kepler/plotting_dvts/plotting_dvts.ipynb                                                                                                                       
execute:mast_notebooks/notebooks/Kepler/plotting_images_from_tpf/plotting_images_from_tpf.ipynb                                                                                                 
execute:mast_notebooks/notebooks/Kepler/plotting_lightcurves/plotting_lightcurves.ipynb                                                                                                         
execute:mast_notebooks/notebooks/Kepler/verifying_the_location_of_a_signal/verifying_the_location_of_a_signal.ipynb                                                                             
execute:mast_notebooks/notebooks/Kepler/visualizing_periodic_signals_using_a_river_plot/visualizing_periodic_signals_using_a_river_plot.ipynb                                                   
execute:mast_notebooks/notebooks/MCCM/FIMS-SPEAR/hyperspectral_healpix_maps/hyperspectral_healpix_maps.ipynb                                                                                    
execute:mast_notebooks/notebooks/PanSTARRS/PS1_DR2_TAP/PS1_DR2_TAP.ipynb                                                                                                                        
execute:mast_notebooks/notebooks/PanSTARRS/PS1_image/PS1_image.ipynb                                                                                                                            
execute:mast_notebooks/notebooks/TESS/asteroid_rotation/asteroid_rotation.ipynb                                                                                                                 
execute:mast_notebooks/notebooks/TESS/asteroid_rotation/asteroid_rotation_soutions.ipynb                                                                                                        
execute:mast_notebooks/notebooks/TESS/beginner_astroquery_dv/beginner_astroquery_dv.ipynb                                                                                                       
execute:mast_notebooks/notebooks/TESS/beginner_how_to_use_dvt/beginner_how_to_use_dvt.ipynb                                                                                                     
execute:mast_notebooks/notebooks/TESS/beginner_how_to_use_ffi/beginner_how_to_use_ffi.ipynb                                                                                                     
execute:mast_notebooks/notebooks/TESS/beginner_how_to_use_lc/beginner_how_to_use_lc.ipynb                                                                                                       
execute:mast_notebooks/notebooks/TESS/beginner_how_to_use_tp/beginner_how_to_use_tp.ipynb                                                                                                       
execute:mast_notebooks/notebooks/TESS/beginner_tess_exomast/beginner_tess_exomast.ipynb                                                                                                         
execute:mast_notebooks/notebooks/TESS/beginner_tess_tap_search/beginner_tess_tap_search.ipynb                                                                                                   
execute:mast_notebooks/notebooks/TESS/beginner_tesscut_astroquery/beginner_tesscut_astroquery.ipynb                                                                                             
execute:mast_notebooks/notebooks/TESS/beginner_tic_search_hd209458/beginner_tic_search_hd209458.ipynb                                                                                           
execute:mast_notebooks/notebooks/TESS/beginner_tour_lc_tp/beginner_tour_lc_tp.ipynb                                                                                                             
execute:mast_notebooks/notebooks/TESS/interm_gi_query/interm_gi_query.ipynb                                                                                                                     
execute:mast_notebooks/notebooks/TESS/interm_tasoc_lc/interm_tasoc_lc.ipynb                                                                                                                     
execute:mast_notebooks/notebooks/TESS/interm_tess_prf_retrieve/interm_tess_prf_retrieve.ipynb                                                                                                   
execute:mast_notebooks/notebooks/TESS/interm_tesscut_dss_overlay/interm_tesscut_dss_overlay.ipynb                                                                                               
execute:mast_notebooks/notebooks/TESS/interm_tesscut_requests/interm_tesscut_requests.ipynb                                                                                                     
execute:mast_notebooks/notebooks/TESS/removing_scattered_light_using_regression/removing_scattered_light_using_regression.ipynb                                                                 
execute:mast_notebooks/notebooks/astrocut/making_tess_cubes_and_cutouts/making_tess_cubes_and_cutouts.ipynb                                                                                     
execute:mast_notebooks/notebooks/astroquery/beginner_search/beginner_search.ipynb                                                                                                               
execute:mast_notebooks/notebooks/astroquery/beginner_zcut/beginner_zcut.ipynb                                                                                                                   
execute:mast_notebooks/notebooks/astroquery/historic_quasar_observations/historic_quasar_observations.ipynb                                                                                     
execute:mast_notebooks/notebooks/astroquery/large_downloads/large_downloads.ipynb                                                                                                               
execute:mast_notebooks/notebooks/astroquery/wildcard_searches/wildcard_searches.ipynb                                                                                                           
%doit -n4 --continue