Init everything, copy original python codes from Gaia