This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ################################################################################################### | |
| # Create two files in the same directory to put the following code in and execute | |
| # Uncomment one particular method of the two to test them. | |
| # Note that runnign both tests consecutively may not give the same results because Python does | |
| # cache the imported libraries even if they are imported in a function/method to try and avoid | |
| # importing them twice. | |
| # The following results were reproduced on my laptop, numbers may differ for you: | |
| # ~/projects $: python test_import.py  ✔  6s   sktime  | |
| $ Deferred import: | |
| $ Slow module was imported! | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from contextlib import contextmanager | |
| from tabulate import tabulate | |
| import numbers | |
| ######################################################################################################################## | |
| # Field validators | |
| ######################################################################################################################## | |
| class ConfigField: | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #include<iostream> | |
| #include<cmath> | |
| #include<Eigen/Core> | |
| #include<array> | |
| #include<assert.h> | |
| //#define DEBUG | |
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ############################################################ | |
| # GAIA | |
| ############################################################ | |
| a.info() | |
| Filename: test_imdiff_recipe/trimmedRefcats/refcats/gen2/gaia_dr2_20200414/gaia_dr2_20200414_231812_refcats_gen2.fits | |
| No. Name Ver Type Cards Dimensions Format | |
| 0 PRIMARY 1 PrimaryHDU 6 () | |
| 1 1 BinTableHDU 113 1060R x 21C [2X, 1K, 1D, 1D, 1D, 1D, 1D, 1D, 1D, 1D, 1E, 1E, 1D, 1D, 1D, 1E, 1E, 1D, 1D, 1D, 52A] | |
| None | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import abc | |
| import io | |
| import yaml | |
| yaml_config1 =""" | |
| version: 1 | |
| search: | |
| param1: val1 | |
| param2: val2 | |
| region_search: | 
      This file has been truncated, but you can view the full file.
    
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | + cd /home/ec2-user/w_2019_31/stack/miniconda3-4.5.12-1172c30/EupsBuildDir/Linux64/verify-18.0.0-1-g9c1f36f+12 | |
| + _EUPS_PATH=/home/ec2-user/w_2019_31/stack/miniconda3-4.5.12-1172c30 | |
| + . /home/ec2-user/w_2019_31/eups/2.1.5/bin/setups.sh | |
| ++ export EUPS_SHELL=sh | |
| ++ EUPS_SHELL=sh | |
| ++ export EUPS_DIR=/home/ec2-user/w_2019_31/eups/2.1.5 | |
| ++ EUPS_DIR=/home/ec2-user/w_2019_31/eups/2.1.5 | |
| +++ echo /home/ec2-user/w_2019_31/eups/2.1.5 | |
| +++ sed -e 's/ /-+-/g' | |
| ++ eupslocalpath=/home/ec2-user/w_2019_31/eups/2.1.5 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | root INFO: forced_src_schema readable (<class 'lsst.afw.table.source.source.SourceCatalog'>): PASS | |
| root INFO: Validating source output for {'tract': 0, 'skymap': 'ci_hsc', 'instrument': 'HSC', 'visit': 903988, 'detector': '24'} | |
| root INFO: Number of sources (3008 > 100): PASS | |
| Touch(".scons/gen3repo-ForcedPhotCcdValidation") | |
| python /home/ec2-user/ci_hsc/tests/test_import.py | |
| ... | |
| ---------------------------------------------------------------------- | |
| Ran 3 tests in 0.056s | |
| OK | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from pyspark.sql import SparkSession | |
| from pyspark.sql.functions import col | |
| spark = SparkSession.builder.getOrCreate() | |
| df = spark.read.format('parquet').load('<path_to_ingesting_file>/part-00000-4cd95544-b48a-4a67-84bb-cbcc70899ca3-c000.snappy.parquet') | |
| df = df.withColumn('ra', col('ra_mock')).drop('ra_mock') | |
| df = df.withColumn('dec', col('dec_mock')).drop('dec_mock') | |
| from axs import AxsCatalog, Constants | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | + cd /home/ec2-user/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/EupsBuildDir/Linux64/apr_util-1.5.4 | |
| + _EUPS_PATH=/home/ec2-user/lsst_stack/stack/miniconda3-4.3.21-10a4fa6 | |
| + . /home/ec2-user/lsst_stack/eups/2.1.4/bin/setups.sh | |
| ++ export EUPS_SHELL=sh | |
| ++ EUPS_SHELL=sh | |
| ++ export EUPS_DIR=/home/ec2-user/lsst_stack/eups/2.1.4 | |
| ++ EUPS_DIR=/home/ec2-user/lsst_stack/eups/2.1.4 | |
| +++ echo /home/ec2-user/lsst_stack/eups/2.1.4 | |
| +++ sed -e 's/ /-+-/g' | |
| ++ eupslocalpath=/home/ec2-user/lsst_stack/eups/2.1.4 |