diff --git a/notebooks/Check_fields.ipynb b/notebooks/Check_fields.ipynb index 6f86b3b..1228699 100644 --- a/notebooks/Check_fields.ipynb +++ b/notebooks/Check_fields.ipynb @@ -54,9 +54,9 @@ "outputs": [], "source": [ "def get_zquery_partnership(start_date=None, end_date=None):\n", - " \n", + "\n", " date_format = \"%Y-%m-%d\"\n", - " \n", + "\n", " if start_date is None:\n", " now = datetime.datetime.now()\n", " last_month = now - datetime.timedelta(days=30)\n", @@ -64,15 +64,19 @@ " if end_date is None:\n", " now = datetime.datetime.now()\n", " end_date = now.strftime(date_format)\n", - " \n", "\n", " # Convert to JD\n", " jd_start = time.Time(start_date).jd\n", " jd_end = time.Time(end_date).jd\n", " # Do the Query to see what exists\n", " zquery = query.ZTFQuery()\n", - " zquery.load_metadata(sql_query=\"pid>1 and obsjd BETWEEN {0} AND {1}\".format(jd_start, jd_end))# this will take about 1min\n", - " zquery.show_gri_fields(title=\"ZTF observations in from {0} to {1}\".format(start_date, end_date), grid=\"main\")\n" + " zquery.load_metadata(\n", + " sql_query=\"pid>1 and obsjd BETWEEN {0} AND {1}\".format(jd_start, jd_end)\n", + " ) # this will take about 1min\n", + " zquery.show_gri_fields(\n", + " title=\"ZTF observations in from {0} to {1}\".format(start_date, end_date),\n", + " grid=\"main\",\n", + " )" ] }, { diff --git a/notebooks/Check_observations.ipynb b/notebooks/Check_observations.ipynb index 34111b4..11f3fa8 100644 --- a/notebooks/Check_observations.ipynb +++ b/notebooks/Check_observations.ipynb @@ -18,7 +18,7 @@ "outputs": [], "source": [ "def get_ztf_data(date=None):\n", - " \"\"\"Function to grab data for a given date using ztfquery. \n", + " \"\"\"Function to grab data for a given date using ztfquery.\n", " Date should be given in format YYYYMMDD, with the day being the UT day for the END of the night.\n", " By default, today is selected\n", " \"\"\"\n", @@ -58,7 +58,11 @@ "source": [ "full_data = get_ztf_data()\n", "\n", - "print(\"Most recent observation in database was at:\", full_data.data.iloc[-1][\"UT_START\"], \"(UT)\")" + "print(\n", + " \"Most recent observation in database was at:\",\n", + " full_data.data.iloc[-1][\"UT_START\"],\n", + " \"(UT)\",\n", + ")" ] }, { @@ -147,7 +151,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.9" + "version": "3.10.9" } }, "nbformat": 4, diff --git a/notebooks/Neutrino_archival_search.ipynb b/notebooks/Neutrino_archival_search.ipynb index db9c8c3..f9c8edd 100644 --- a/notebooks/Neutrino_archival_search.ipynb +++ b/notebooks/Neutrino_archival_search.ipynb @@ -28,6 +28,7 @@ "outputs": [], "source": [ "import logging\n", + "\n", "logger = logging.getLogger(\"quiet_logger\")\n", "logger.setLevel(logging.ERROR)" ] @@ -99,7 +100,7 @@ } ], "source": [ - "nu = NeutrinoScanner(\"IC200530A\", logger=logger, t_offset=5.)" + "nu = NeutrinoScanner(\"IC200530A\", logger=logger, t_offset=5.0)" ] }, { @@ -272,12 +273,16 @@ "source": [ "from neutrino_scanner import NeutrinoScanner\n", "from astropy.time import Time\n", - "nu = NeutrinoScanner(manual_args=(\n", - " \"LAT-ANTARES\", \n", - " [142.5603, +0.9, -0.9],\n", - " [-18.0672, +0.9, -0.9],\n", - " Time(\"2020-01-08T09:30:14.48\", format='isot', scale='utc')\n", - "), logger=logger)\n", + "\n", + "nu = NeutrinoScanner(\n", + " manual_args=(\n", + " \"LAT-ANTARES\",\n", + " [142.5603, +0.9, -0.9],\n", + " [-18.0672, +0.9, -0.9],\n", + " Time(\"2020-01-08T09:30:14.48\", format=\"isot\", scale=\"utc\"),\n", + " ),\n", + " logger=logger,\n", + ")\n", "nu.scan_cones()\n", "nu.plot_overlap_with_observations()" ] @@ -293,7 +298,7 @@ "fs = [542, 543, 544]\n", "for f in fs:\n", " ra, dec = ztfquery_fields.field_to_coords(f)[0]\n", - " print(f, ra, dec, ra-3.5, ra+3.5)" + " print(f, ra, dec, ra - 3.5, ra + 3.5)" ] }, { @@ -301,11 +306,7 @@ "execution_count": null, "metadata": {}, "outputs": [], - "source": [ - "\n", - "\n", - "\n" - ] + "source": [] }, { "cell_type": "code", diff --git a/nuztf/skymap_scanner.py b/nuztf/skymap_scanner.py index 7da2d31..44e5ba6 100644 --- a/nuztf/skymap_scanner.py +++ b/nuztf/skymap_scanner.py @@ -354,7 +354,9 @@ def filter_f_no_prv(self, res: dict, t_max_jd=None) -> bool: self.logger.debug(f"❌ {res['objectId']}: Outside of event contour.") return False - self.logger.debug(f"✅ {res['objectId']}: Passes first filtering stage (no prv)") + self.logger.debug( + f"✅ {res['objectId']}: Passes first filtering stage (no prv)" + ) return True diff --git a/poetry.lock b/poetry.lock index d9a6ff1..994d99a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -654,33 +654,33 @@ lxml = ["lxml"] [[package]] name = "black" -version = "23.12.1" +version = "24.3.0" description = "The uncompromising code formatter." optional = false python-versions = ">=3.8" files = [ - {file = "black-23.12.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e0aaf6041986767a5e0ce663c7a2f0e9eaf21e6ff87a5f95cbf3675bfd4c41d2"}, - {file = "black-23.12.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c88b3711d12905b74206227109272673edce0cb29f27e1385f33b0163c414bba"}, - {file = "black-23.12.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a920b569dc6b3472513ba6ddea21f440d4b4c699494d2e972a1753cdc25df7b0"}, - {file = "black-23.12.1-cp310-cp310-win_amd64.whl", hash = "sha256:3fa4be75ef2a6b96ea8d92b1587dd8cb3a35c7e3d51f0738ced0781c3aa3a5a3"}, - {file = "black-23.12.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8d4df77958a622f9b5a4c96edb4b8c0034f8434032ab11077ec6c56ae9f384ba"}, - {file = "black-23.12.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:602cfb1196dc692424c70b6507593a2b29aac0547c1be9a1d1365f0d964c353b"}, - {file = "black-23.12.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c4352800f14be5b4864016882cdba10755bd50805c95f728011bcb47a4afd59"}, - {file = "black-23.12.1-cp311-cp311-win_amd64.whl", hash = "sha256:0808494f2b2df923ffc5723ed3c7b096bd76341f6213989759287611e9837d50"}, - {file = "black-23.12.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:25e57fd232a6d6ff3f4478a6fd0580838e47c93c83eaf1ccc92d4faf27112c4e"}, - {file = "black-23.12.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2d9e13db441c509a3763a7a3d9a49ccc1b4e974a47be4e08ade2a228876500ec"}, - {file = "black-23.12.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d1bd9c210f8b109b1762ec9fd36592fdd528485aadb3f5849b2740ef17e674e"}, - {file = "black-23.12.1-cp312-cp312-win_amd64.whl", hash = "sha256:ae76c22bde5cbb6bfd211ec343ded2163bba7883c7bc77f6b756a1049436fbb9"}, - {file = "black-23.12.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1fa88a0f74e50e4487477bc0bb900c6781dbddfdfa32691e780bf854c3b4a47f"}, - {file = "black-23.12.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a4d6a9668e45ad99d2f8ec70d5c8c04ef4f32f648ef39048d010b0689832ec6d"}, - {file = "black-23.12.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b18fb2ae6c4bb63eebe5be6bd869ba2f14fd0259bda7d18a46b764d8fb86298a"}, - {file = "black-23.12.1-cp38-cp38-win_amd64.whl", hash = "sha256:c04b6d9d20e9c13f43eee8ea87d44156b8505ca8a3c878773f68b4e4812a421e"}, - {file = "black-23.12.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3e1b38b3135fd4c025c28c55ddfc236b05af657828a8a6abe5deec419a0b7055"}, - {file = "black-23.12.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4f0031eaa7b921db76decd73636ef3a12c942ed367d8c3841a0739412b260a54"}, - {file = "black-23.12.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:97e56155c6b737854e60a9ab1c598ff2533d57e7506d97af5481141671abf3ea"}, - {file = "black-23.12.1-cp39-cp39-win_amd64.whl", hash = "sha256:dd15245c8b68fe2b6bd0f32c1556509d11bb33aec9b5d0866dd8e2ed3dba09c2"}, - {file = "black-23.12.1-py3-none-any.whl", hash = "sha256:78baad24af0f033958cad29731e27363183e140962595def56423e626f4bee3e"}, - {file = "black-23.12.1.tar.gz", hash = "sha256:4ce3ef14ebe8d9509188014d96af1c456a910d5b5cbf434a09fef7e024b3d0d5"}, + {file = "black-24.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7d5e026f8da0322b5662fa7a8e752b3fa2dac1c1cbc213c3d7ff9bdd0ab12395"}, + {file = "black-24.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9f50ea1132e2189d8dff0115ab75b65590a3e97de1e143795adb4ce317934995"}, + {file = "black-24.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2af80566f43c85f5797365077fb64a393861a3730bd110971ab7a0c94e873e7"}, + {file = "black-24.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:4be5bb28e090456adfc1255e03967fb67ca846a03be7aadf6249096100ee32d0"}, + {file = "black-24.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4f1373a7808a8f135b774039f61d59e4be7eb56b2513d3d2f02a8b9365b8a8a9"}, + {file = "black-24.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:aadf7a02d947936ee418777e0247ea114f78aff0d0959461057cae8a04f20597"}, + {file = "black-24.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65c02e4ea2ae09d16314d30912a58ada9a5c4fdfedf9512d23326128ac08ac3d"}, + {file = "black-24.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:bf21b7b230718a5f08bd32d5e4f1db7fc8788345c8aea1d155fc17852b3410f5"}, + {file = "black-24.3.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:2818cf72dfd5d289e48f37ccfa08b460bf469e67fb7c4abb07edc2e9f16fb63f"}, + {file = "black-24.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4acf672def7eb1725f41f38bf6bf425c8237248bb0804faa3965c036f7672d11"}, + {file = "black-24.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c7ed6668cbbfcd231fa0dc1b137d3e40c04c7f786e626b405c62bcd5db5857e4"}, + {file = "black-24.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:56f52cfbd3dabe2798d76dbdd299faa046a901041faf2cf33288bc4e6dae57b5"}, + {file = "black-24.3.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:79dcf34b33e38ed1b17434693763301d7ccbd1c5860674a8f871bd15139e7837"}, + {file = "black-24.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:e19cb1c6365fd6dc38a6eae2dcb691d7d83935c10215aef8e6c38edee3f77abd"}, + {file = "black-24.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65b76c275e4c1c5ce6e9870911384bff5ca31ab63d19c76811cb1fb162678213"}, + {file = "black-24.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:b5991d523eee14756f3c8d5df5231550ae8993e2286b8014e2fdea7156ed0959"}, + {file = "black-24.3.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c45f8dff244b3c431b36e3224b6be4a127c6aca780853574c00faf99258041eb"}, + {file = "black-24.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6905238a754ceb7788a73f02b45637d820b2f5478b20fec82ea865e4f5d4d9f7"}, + {file = "black-24.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7de8d330763c66663661a1ffd432274a2f92f07feeddd89ffd085b5744f85e7"}, + {file = "black-24.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:7bb041dca0d784697af4646d3b62ba4a6b028276ae878e53f6b4f74ddd6db99f"}, + {file = "black-24.3.0-py3-none-any.whl", hash = "sha256:41622020d7120e01d377f74249e677039d20e6344ff5851de8a10f11f513bf93"}, + {file = "black-24.3.0.tar.gz", hash = "sha256:a0c9c4a0771afc6919578cec71ce82a3e31e054904e7197deacbc9382671c41f"}, ] [package.dependencies] @@ -6076,4 +6076,4 @@ slackbot = ["flask", "gunicorn", "slackclient", "slackeventsapi"] [metadata] lock-version = "2.0" python-versions = ">=3.10,<3.12" -content-hash = "8f0daf31c1da3891b2d76590fed7a877a0db08b0884f557126bda244ff18d26f" +content-hash = "a0532fdc5ead72bb556efb3cd3b2b9de73046584d749f16029ba3d82eacdc3a7" diff --git a/pyproject.toml b/pyproject.toml index fb08c18..4d47daa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ slackeventsapi = {version = "^3.0.1", optional = true} [tool.poetry.dev-dependencies] -black = "^23.1.0" +black = "^24.3.0" coverage = "^6.0" coveralls = "^3.3.1" pytest = "^7.4.0"